home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 33 / Mac Magazin and MacEasy Magazine CD - Issue 33.iso / Office / Cool Address 1.5ƒ / Cool Address 1.5 / Cool Address 1.5 / background_15901.xml next >
Extensible Markup Language  |  1997-05-23  |  124KB  |  1,560 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>15901</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_16163.pbm</bitmap>
  7.     <cantDelete> <true /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <true /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_2120.css" />
  11.     <part>
  12.         <id>121</id>
  13.         <type>field</type>
  14.         <visible> <true /> </visible>
  15.         <dontWrap> <true /> </dontWrap>
  16.         <dontSearch> <false /> </dontSearch>
  17.         <sharedText> <true /> </sharedText>
  18.         <fixedLineHeight> <true /> </fixedLineHeight>
  19.         <autoTab> <false /> </autoTab>
  20.         <lockText> <true /> </lockText>
  21.         <rect>
  22.             <left>314</left>
  23.             <top>25</top>
  24.             <right>524</right>
  25.             <bottom>43</bottom>
  26.         </rect>
  27.         <style>transparent</style>
  28.         <autoSelect> <false /> </autoSelect>
  29.         <showLines> <false /> </showLines>
  30.         <wideMargins> <false /> </wideMargins>
  31.         <multipleLines> <false /> </multipleLines>
  32.         <reservedFamily> 0 </reservedFamily>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>left</textAlign>
  36.         <font>Times</font>
  37.         <textSize>12</textSize>
  38.         <textStyle>underline</textStyle>
  39.         <textStyle>bold</textStyle>
  40.         <textHeight>16</textHeight>
  41.         <name>‚Ä¢Label</name>
  42.         <script>-- on Switch-- beep 2-- put bg field "Street" into MailStuff-- put bg field "POBox" into bg field "Street"-- put MailStuff into bg field "POBox"-- wait 2 second-- end switch-- on ClearOne-- beep-- put empty into bg field "POBox"-- wait 1 second-- end ClearOne-- on mouseup-- if the optionkey is down-- then-- play click-- ask "Number"-- put it into startNo-- lock screen-- repeat with x = startNo to the number of cards in this bg-- put x-- go card x of this bg-- if bg field "Street" is empty AND bg field "POBox" is empty then next repeat-- else unlock screen-- if bg field "Street" contains "Box" then Switch-- if bg field "POBox" is not empty AND "box" is not in bg field "POBox" then switch-- if bg field "Street" = bg field "POBox" then ClearOne-- lock screen-- end repeat-- end if-- if the shiftKey is down then switch-- end mouseup</script>
  43.     </part>
  44.     <part>
  45.         <id>1</id>
  46.         <type>field</type>
  47.         <visible> <true /> </visible>
  48.         <dontWrap> <true /> </dontWrap>
  49.         <dontSearch> <false /> </dontSearch>
  50.         <sharedText> <false /> </sharedText>
  51.         <fixedLineHeight> <true /> </fixedLineHeight>
  52.         <autoTab> <true /> </autoTab>
  53.         <lockText> <false /> </lockText>
  54.         <rect>
  55.             <left>83</left>
  56.             <top>39</top>
  57.             <right>309</right>
  58.             <bottom>59</bottom>
  59.         </rect>
  60.         <style>rectangle</style>
  61.         <autoSelect> <false /> </autoSelect>
  62.         <showLines> <true /> </showLines>
  63.         <wideMargins> <false /> </wideMargins>
  64.         <multipleLines> <false /> </multipleLines>
  65.         <reservedFamily> 0 </reservedFamily>
  66.         <titleWidth>0</titleWidth>
  67.         <icon>0</icon>
  68.         <textAlign>left</textAlign>
  69.         <font>Times</font>
  70.         <textSize>14</textSize>
  71.         <textStyle>bold</textStyle>
  72.         <textHeight>18</textHeight>
  73.         <name>Name</name>
  74.         <script>on closeFieldglobal OldNameput OldName into CheckOldName -- for CC fixif me is empty then put oldName into meif the length of me > 33 then put char 1 to 33 of me into merepeatif char 1 of me = " " then delete char 1 of meelse exit repeatend repeatif me contains return then RemoveReturnsput changetheCase(me) into TheTEXTput checkCommas(TheTEXT) into meif me = OldName then exit closefieldif there is not a card methen----- updates index and sets card name to = me ------------set the name of this card to meUpdateIndexesput empty into OldNamesend SwitchOn to bg button "sort"send "addressMe" to bg field "‚Ä¢addresssummary"------------------------------------------------------------elseAnswer "There is already a record for:" && me -- with "Delete" or "Continue"-- if it is "Delete" then send deletesingle to bg button "delete"-- elseif last word of me is a numberthenif the number of words in me = 1thenselect text of meexit closefieldend ifadd 1 to last word of meelseput me && "2" into meend ifsend closefield to meselect text of me-- end ifend ifglobal modeif mode = "contribution" then checkGifts CheckOldNameend closeFieldon exitFieldif me contains returnthenRemoveReturnsset the name of this card to meend ifend exitfieldon OpenFieldglobal OldNameput me into OldNameend OpenFieldon UpdateIndexesglobal OldNameset cursor to watchput me into NewName-- Update All Records Index -----------------------------------if OldName is not emptythenput (the length of OldName) into StringLengthput offset (OldName & return,bg field "All Records index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength) ¬¨of bg field "All Records index"end ifend ifput NewName & return before bg field "all Records index"sort bg field "All Records Index"---------------------------------------------------------------PutCardsInOrder -- simply sets the new record variable to true-- PutCardsInOrderB -- slow way to sort right now-- PutCardsInOrderC -- slow way to sort right now-- update people / business index -----------------------------if hilight of bg button "business" is truethenif Oldname is not emptythenput offset (OldName & return,bg field "business index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength)  of bg field "business index"end ifend ifput NewName & return before bg field "business index"sort bg field "Business index"elseif oldName is not emptythenput offset (OldName & return,bg field "people index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength) of bg field "people index"end ifend ifput NewName & return before bg field "people index"sort bg field "people index"end if-- Update Mail Index -----------------------------------if hilight of bg button "Mail" is truethenif OldName is not emptythenput offset (OldName & return,bg field "mail index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength) of bg field "mail index"end ifend ifput NewName & return before bg field "Mail index"sort bg field "Mail index"end ifend UpdateIndexeson PutCardsInOrderglobal NewRecordput "True" into NewRecordend PutCardsInOrderon PutCardsInOrderBput the ticks into StartTimelock screenpush cardsort cards of this bg by bg field "name"pop card-- unlock screenput the ticks - StartTimeend putCardsInOrderBon mouseenterFullBalloons showDirect,"Enter NAME here in this format:" & return &¬¨"LAST NAME,FIRST NAME(S)" & return & return &¬¨"Capitalization is automatic & names are limited to 33 characters."end mouseenter-- on checkGifts oldName-- put the short name of this card into NewName-- put OldName into TheName-- put 1 into Z-- lock messages-- lock recent-- lock screen-- push card-- repeat with x = 1 to the number of cards in bg "reports"-- put bg field "Account Summary" of card x of bg "reports" into PageSummary-- if theName is in PageSummary-- then-- set itemDelimiter to tab-- set cursor to busy-- put bg field "date" of card x of bg "reports" into PageDate-- put "Please Wait... Updating Gift Information For Card" && x & " of " & number of cards in bg "reports"-- go card x of bg "Reports"-- repeat with y = 1 to the number of lines in PageSummary-- if item 1 of line y of PageSummary = theName then-- put NewName into item 1 of line y of PageSummary-- end if-- end repeat-- put PageSummary into bg field "Account Summary"-- send "AlignMe" to bg field "Account Summary Display"-- end if-- put NumberFormat into TestFormat-- set numberformat to 0.######-- end repeat-- pop card-- hide message-- end CheckGiftson checkGifts oldNameput the short name of this card into NewNameput 1 into Zlock messageslock recentlock screenpush cardrepeat with x = 1 to the number of cards in bg "reports"put bg field "Account Summary" of card x of bg "reports" into PageSummaryif OldName is in PageSummarythenset itemDelimiter to tabset cursor to busyput "Please Wait... Updating Gift Information For Card" && x & " of " & number of cards in bg "reports"go card x of bg "Reports"put the number of lines in PageSummary into PageLinesrepeat with y = 1 to PageLinesif item 1 of line y of PageSummary = OldName thenput NewName into item 1 of line y of PageSummaryif OldName is not in PageSummary then exit repeatend ifend repeatput PageSummary into bg field "Account Summary"send "AlignMe" to bg field "Account Summary Display"end ifend repeatpop cardput emptyhide messageend CheckGifts</script>
  75.     </part>
  76.     <part>
  77.         <id>3</id>
  78.         <type>field</type>
  79.         <visible> <true /> </visible>
  80.         <dontWrap> <true /> </dontWrap>
  81.         <dontSearch> <false /> </dontSearch>
  82.         <sharedText> <false /> </sharedText>
  83.         <fixedLineHeight> <true /> </fixedLineHeight>
  84.         <autoTab> <true /> </autoTab>
  85.         <lockText> <false /> </lockText>
  86.         <rect>
  87.             <left>83</left>
  88.             <top>79</top>
  89.             <right>309</right>
  90.             <bottom>97</bottom>
  91.         </rect>
  92.         <style>rectangle</style>
  93.         <autoSelect> <false /> </autoSelect>
  94.         <showLines> <true /> </showLines>
  95.         <wideMargins> <false /> </wideMargins>
  96.         <multipleLines> <false /> </multipleLines>
  97.         <reservedFamily> 0 </reservedFamily>
  98.         <titleWidth>0</titleWidth>
  99.         <icon>0</icon>
  100.         <textAlign>left</textAlign>
  101.         <font>Times</font>
  102.         <textSize>14</textSize>
  103.         <textStyle>plain</textStyle>
  104.         <textHeight>15</textHeight>
  105.         <name>Street</name>
  106.         <script>on closeFieldif me contains return then RemoveReturnsput changetheCase(me) into mesend "addressMe" to bg field "‚Ä¢addresssummary"end closeFieldon exitFieldif me contains return then CloseFieldend exitfieldon mouseenterFullBalloons showDirect,"Enter physical STREET ADDRESS here." &&¬¨"Capitalization is handled automatically."end mouseenter</script>
  107.     </part>
  108.     <part>
  109.         <id>4</id>
  110.         <type>field</type>
  111.         <visible> <true /> </visible>
  112.         <dontWrap> <true /> </dontWrap>
  113.         <dontSearch> <false /> </dontSearch>
  114.         <sharedText> <false /> </sharedText>
  115.         <fixedLineHeight> <true /> </fixedLineHeight>
  116.         <autoTab> <true /> </autoTab>
  117.         <lockText> <false /> </lockText>
  118.         <rect>
  119.             <left>83</left>
  120.             <top>98</top>
  121.             <right>309</right>
  122.             <bottom>116</bottom>
  123.         </rect>
  124.         <style>rectangle</style>
  125.         <autoSelect> <false /> </autoSelect>
  126.         <showLines> <true /> </showLines>
  127.         <wideMargins> <false /> </wideMargins>
  128.         <multipleLines> <false /> </multipleLines>
  129.         <reservedFamily> 0 </reservedFamily>
  130.         <titleWidth>0</titleWidth>
  131.         <icon>0</icon>
  132.         <textAlign>left</textAlign>
  133.         <font>Times</font>
  134.         <textSize>14</textSize>
  135.         <textStyle>plain</textStyle>
  136.         <textHeight>15</textHeight>
  137.         <name>POBox</name>
  138.         <script>on closeFieldif me contains return then RemoveReturnsif me = " " then put empty into meif me = "  " then put empty into meput changeTheCase(me) into meif first word of me = "po" then put "PO" into first word of meif me is a number then put "PO Box " before mesend "addressMe" to bg field "‚Ä¢addresssummary"end closeFieldon exitFieldif me contains return then CloseFieldend exitfieldon mouseenterFullBalloons showDirect,"Enter the PO BOX number here.  When you enter a number alone, 'PO BOX' is added automatically."¬¨&& "Capitalization is handled automatically."end mouseenter</script>
  139.     </part>
  140.     <part>
  141.         <id>5</id>
  142.         <type>field</type>
  143.         <visible> <true /> </visible>
  144.         <dontWrap> <true /> </dontWrap>
  145.         <dontSearch> <false /> </dontSearch>
  146.         <sharedText> <false /> </sharedText>
  147.         <fixedLineHeight> <true /> </fixedLineHeight>
  148.         <autoTab> <true /> </autoTab>
  149.         <lockText> <false /> </lockText>
  150.         <rect>
  151.             <left>83</left>
  152.             <top>117</top>
  153.             <right>309</right>
  154.             <bottom>135</bottom>
  155.         </rect>
  156.         <style>rectangle</style>
  157.         <autoSelect> <false /> </autoSelect>
  158.         <showLines> <true /> </showLines>
  159.         <wideMargins> <false /> </wideMargins>
  160.         <multipleLines> <false /> </multipleLines>
  161.         <reservedFamily> 0 </reservedFamily>
  162.         <titleWidth>0</titleWidth>
  163.         <icon>0</icon>
  164.         <textAlign>left</textAlign>
  165.         <font>Times</font>
  166.         <textSize>14</textSize>
  167.         <textStyle>plain</textStyle>
  168.         <textHeight>15</textHeight>
  169.         <name>CityState</name>
  170.         <script>on closeFieldglobal CapsOnif me contains return then RemoveReturnsput changeTheCase(me) into mesend "addressMe" to bg field "‚Ä¢addresssummary"end closeFieldon exitFieldif me contains return then CloseFieldend exitfieldon mouseenterFullBalloons showDirect,"Enter CITY here. Capitalization is handled automatically." & return & ¬¨return & "NOTE: The two letter state abbreviation will be added automatically to this field when you enter the zip code."end mouseenter</script>
  171.     </part>
  172.     <part>
  173.         <id>7</id>
  174.         <type>field</type>
  175.         <visible> <true /> </visible>
  176.         <dontWrap> <true /> </dontWrap>
  177.         <dontSearch> <false /> </dontSearch>
  178.         <sharedText> <false /> </sharedText>
  179.         <fixedLineHeight> <true /> </fixedLineHeight>
  180.         <autoTab> <true /> </autoTab>
  181.         <lockText> <false /> </lockText>
  182.         <rect>
  183.             <left>83</left>
  184.             <top>136</top>
  185.             <right>309</right>
  186.             <bottom>154</bottom>
  187.         </rect>
  188.         <style>rectangle</style>
  189.         <autoSelect> <false /> </autoSelect>
  190.         <showLines> <true /> </showLines>
  191.         <wideMargins> <false /> </wideMargins>
  192.         <multipleLines> <false /> </multipleLines>
  193.         <reservedFamily> 0 </reservedFamily>
  194.         <titleWidth>0</titleWidth>
  195.         <icon>0</icon>
  196.         <textAlign>left</textAlign>
  197.         <font>Times</font>
  198.         <textSize>14</textSize>
  199.         <textStyle>plain</textStyle>
  200.         <textHeight>15</textHeight>
  201.         <name>Zip</name>
  202.         <script>on closefieldif me is empty then-- do nothingelseif me contains return then RemoveReturnsget zipCheck(me)if it is not empty thenput " " & it into Stateif item 2 of bg field "CityState" <> Statethen put State into item 2 of bg field "CityState"end ifend ifsend "addressMe" to bg field "‚Ä¢addresssummary"end closeFieldon exitFieldif me contains return then CloseFieldend exitfieldon mouseenterFullBalloons showDirect,"Enter Zip Code here.  The two letter state" &&¬¨"abbreviation will be added to the field above automatically."end mouseenter</script>
  203.     </part>
  204.     <part>
  205.         <id>2</id>
  206.         <type>field</type>
  207.         <visible> <true /> </visible>
  208.         <dontWrap> <true /> </dontWrap>
  209.         <dontSearch> <false /> </dontSearch>
  210.         <sharedText> <false /> </sharedText>
  211.         <fixedLineHeight> <true /> </fixedLineHeight>
  212.         <autoTab> <true /> </autoTab>
  213.         <lockText> <false /> </lockText>
  214.         <rect>
  215.             <left>83</left>
  216.             <top>161</top>
  217.             <right>309</right>
  218.             <bottom>226</bottom>
  219.         </rect>
  220.         <style>scrolling</style>
  221.         <autoSelect> <false /> </autoSelect>
  222.         <showLines> <true /> </showLines>
  223.         <wideMargins> <false /> </wideMargins>
  224.         <multipleLines> <false /> </multipleLines>
  225.         <reservedFamily> 0 </reservedFamily>
  226.         <titleWidth>0</titleWidth>
  227.         <icon>0</icon>
  228.         <textAlign>left</textAlign>
  229.         <font>Times</font>
  230.         <textSize>12</textSize>
  231.         <textStyle>plain</textStyle>
  232.         <textHeight>16</textHeight>
  233.         <name>Phone</name>
  234.         <script>on closeFieldif me contains "," then CheckCommasput me into TempMerepeat with y = number of lines in TempMe down to 1if line y of TempMe is empty then delete line y of TempMeput FormatePHone(line y of TempMe) into line y of TempMeend repeatput changeTheCase(TempMe) into TempMeput tempme into mesend dateit to bg field "lastmodified"end closeFieldon exitField-- if me contains return then RemoveReturnsend exitfieldon checkCommas -- THIS INSURES COMPATIBILITY WITH CC PROGRAMput me into TheTextrepeat with z = 1 to the number of characters in TheTextif char z of TheText = "," then put " " into Char z of TheTextend repeatput TheText into meend checkCommason mouseenterFullBalloons showDirect,"Enter phone numbers here with any notes you want to add to the right of the number.  In most cases" &&¬¨"your numbers will be automatically formated for you. Capitalization is automatic." & return &¬¨"These numbers can be dialed for you by using the button to the left."end mouseenter</script>
  235.     </part>
  236.     <part>
  237.         <id>128</id>
  238.         <type>field</type>
  239.         <visible> <true /> </visible>
  240.         <dontWrap> <true /> </dontWrap>
  241.         <dontSearch> <false /> </dontSearch>
  242.         <sharedText> <false /> </sharedText>
  243.         <fixedLineHeight> <true /> </fixedLineHeight>
  244.         <autoTab> <true /> </autoTab>
  245.         <lockText> <false /> </lockText>
  246.         <rect>
  247.             <left>83</left>
  248.             <top>231</top>
  249.             <right>309</right>
  250.             <bottom>283</bottom>
  251.         </rect>
  252.         <style>scrolling</style>
  253.         <autoSelect> <false /> </autoSelect>
  254.         <showLines> <true /> </showLines>
  255.         <wideMargins> <false /> </wideMargins>
  256.         <multipleLines> <false /> </multipleLines>
  257.         <reservedFamily> 0 </reservedFamily>
  258.         <titleWidth>0</titleWidth>
  259.         <icon>0</icon>
  260.         <textAlign>left</textAlign>
  261.         <font>Times</font>
  262.         <textSize>12</textSize>
  263.         <textStyle>plain</textStyle>
  264.         <textHeight>16</textHeight>
  265.         <name>E-Mail</name>
  266.         <script>on closeFieldput me into TempMerepeat with y = number of lines in TempMe down to 1if line y of TempMe is empty then delete line y of TempMeend repeat-- put changeTheCase(TempMe) into TempMesort lines of tempmeput tempme into mesend dateit to bg field "lastmodified"end closeFieldon mouseenterFullBalloons showDirect,"Enter e-mail addresses here.  They will be sorted alphabetically."end mouseenter</script>
  267.     </part>
  268.     <part>
  269.         <id>9</id>
  270.         <type>field</type>
  271.         <visible> <true /> </visible>
  272.         <dontWrap> <false /> </dontWrap>
  273.         <dontSearch> <false /> </dontSearch>
  274.         <sharedText> <false /> </sharedText>
  275.         <fixedLineHeight> <true /> </fixedLineHeight>
  276.         <autoTab> <true /> </autoTab>
  277.         <lockText> <false /> </lockText>
  278.         <rect>
  279.             <left>83</left>
  280.             <top>325</top>
  281.             <right>309</right>
  282.             <bottom>398</bottom>
  283.         </rect>
  284.         <style>scrolling</style>
  285.         <autoSelect> <false /> </autoSelect>
  286.         <showLines> <true /> </showLines>
  287.         <wideMargins> <false /> </wideMargins>
  288.         <multipleLines> <false /> </multipleLines>
  289.         <reservedFamily> 0 </reservedFamily>
  290.         <titleWidth>0</titleWidth>
  291.         <icon>0</icon>
  292.         <textAlign>left</textAlign>
  293.         <font>Times</font>
  294.         <textSize>14</textSize>
  295.         <textStyle>plain</textStyle>
  296.         <textHeight>15</textHeight>
  297.         <name>Special Dates</name>
  298.         <script>on closefieldset cursor to watchrepeat with x = number of lines in me down to 1if line x of me is empty then delete line x of meelse-- use this space to verify the proper format-- "date,description"end ifend repeatsend dateit to bg field "lastmodified"end closefieldon mouseenterFullBalloons showDirect,"I hold information such as Birthdays and" &&¬¨"Anniversaries.  Information should be entered in this format:" & return &¬¨"Date, Description of event"end mouseenter</script>
  299.     </part>
  300.     <part>
  301.         <id>11</id>
  302.         <type>field</type>
  303.         <visible> <true /> </visible>
  304.         <dontWrap> <false /> </dontWrap>
  305.         <dontSearch> <false /> </dontSearch>
  306.         <sharedText> <false /> </sharedText>
  307.         <fixedLineHeight> <true /> </fixedLineHeight>
  308.         <autoTab> <false /> </autoTab>
  309.         <lockText> <false /> </lockText>
  310.         <rect>
  311.             <left>315</left>
  312.             <top>130</top>
  313.             <right>530</right>
  314.             <bottom>366</bottom>
  315.         </rect>
  316.         <style>scrolling</style>
  317.         <autoSelect> <false /> </autoSelect>
  318.         <showLines> <true /> </showLines>
  319.         <wideMargins> <true /> </wideMargins>
  320.         <multipleLines> <false /> </multipleLines>
  321.         <reservedFamily> 0 </reservedFamily>
  322.         <titleWidth>0</titleWidth>
  323.         <icon>0</icon>
  324.         <textAlign>left</textAlign>
  325.         <font>Times</font>
  326.         <textSize>14</textSize>
  327.         <textStyle>plain</textStyle>
  328.         <textHeight>15</textHeight>
  329.         <name>Notes</name>
  330.         <script>on closefieldsend dateit to bg field "lastmodified"put 1 into xrepeat with x = 1 to the number of lines in meif line x of me is not empty then exit repeatend repeatif x > 1 thenput x - 1 into xdelete line 1 to x of meend ifend closefieldon mouseupif there is a window "notes" thenplay "click"put the text of window notes into meshow window "notes"else set the locktext of me to falseend mouseupon mouseenterFullBalloons showDirect,"Enter any notes you would like about this person or business here."end mouseenter</script>
  331.     </part>
  332.     <part>
  333.         <id>17</id>
  334.         <type>field</type>
  335.         <visible> <true /> </visible>
  336.         <dontWrap> <true /> </dontWrap>
  337.         <dontSearch> <false /> </dontSearch>
  338.         <sharedText> <true /> </sharedText>
  339.         <fixedLineHeight> <true /> </fixedLineHeight>
  340.         <autoTab> <false /> </autoTab>
  341.         <lockText> <true /> </lockText>
  342.         <rect>
  343.             <left>0</left>
  344.             <top>19</top>
  345.             <right>80</right>
  346.             <bottom>400</bottom>
  347.         </rect>
  348.         <style>transparent</style>
  349.         <autoSelect> <false /> </autoSelect>
  350.         <showLines> <false /> </showLines>
  351.         <wideMargins> <false /> </wideMargins>
  352.         <multipleLines> <false /> </multipleLines>
  353.         <reservedFamily> 0 </reservedFamily>
  354.         <titleWidth>0</titleWidth>
  355.         <icon>0</icon>
  356.         <textAlign>right</textAlign>
  357.         <font>Times</font>
  358.         <textSize>14</textSize>
  359.         <textStyle>bold</textStyle>
  360.         <textHeight>19</textHeight>
  361.         <name>‚Ä¢Label</name>
  362.         <script></script>
  363.     </part>
  364.     <part>
  365.         <id>21</id>
  366.         <type>button</type>
  367.         <visible> <true /> </visible>
  368.         <reserved5> 0 </reserved5>
  369.         <reserved4> 0 </reserved4>
  370.         <reserved3> 0 </reserved3>
  371.         <reserved2> 0 </reserved2>
  372.         <reserved1> 0 </reserved1>
  373.         <enabled> <true /> </enabled>
  374.         <rect>
  375.             <left>61</left>
  376.             <top>179</top>
  377.             <right>78</right>
  378.             <bottom>196</bottom>
  379.         </rect>
  380.         <style>rectangle</style>
  381.         <showName> <false /> </showName>
  382.         <highlight> <false /> </highlight>
  383.         <autoHighlight> <true /> </autoHighlight>
  384.         <sharedHighlight> <true /> </sharedHighlight>
  385.         <family>0</family>
  386.         <titleWidth>0</titleWidth>
  387.         <icon>159</icon>
  388.         <textAlign>right</textAlign>
  389.         <font>Geneva</font>
  390.         <textSize>9</textSize>
  391.         <textStyle>plain</textStyle>
  392.         <name>Phone Number 1</name>
  393.         <script>on mouseStillDownset itemDelimiter to returnput bg field "Phone" into TheListif theList is empty then exit MouseStillDown---------repeat -- this pop up xcmd cannot display "(" marksset cursor to busyget offset ("(",theList)if it is not 0 then put "[" into char it of theListelse exit repeatend repeatrepeat -- this pop up xcmd cannot display "(" marksset cursor to busyget offset (")",theList)if it is not 0 then put "]" into char it of theListelse exit repeatend repeat----------------get FullHPop(TheList,1,1)if it is not empty thenplay "click"set itemDelimiter to ","dialNumber (item 1 of it)end ifend mousestillDownon mouseenterFullBalloons showDirect,"Hold down the mouse to get a pop up menu of the numbers to the right.  Then simply"¬¨&& "choose a number from the menu to have it dialed for you automatically."end mouseenter</script>
  394.     </part>
  395.     <part>
  396.         <id>22</id>
  397.         <type>button</type>
  398.         <visible> <true /> </visible>
  399.         <reserved5> 0 </reserved5>
  400.         <reserved4> 0 </reserved4>
  401.         <reserved3> 0 </reserved3>
  402.         <reserved2> 0 </reserved2>
  403.         <reserved1> 0 </reserved1>
  404.         <enabled> <true /> </enabled>
  405.         <rect>
  406.             <left>101</left>
  407.             <top>299</top>
  408.             <right>187</right>
  409.             <bottom>321</bottom>
  410.         </rect>
  411.         <style>checkbox</style>
  412.         <showName> <true /> </showName>
  413.         <highlight> <false /> </highlight>
  414.         <autoHighlight> <true /> </autoHighlight>
  415.         <sharedHighlight> <false /> </sharedHighlight>
  416.         <family>0</family>
  417.         <titleWidth>0</titleWidth>
  418.         <icon>0</icon>
  419.         <textAlign>center</textAlign>
  420.         <font>Chicago</font>
  421.         <textSize>12</textSize>
  422.         <textStyle>plain</textStyle>
  423.         <name>Mail</name>
  424.         <script>on mouseUpplay "click"updatemesend dateit to bg field "lastmodified"end mouseupon updatemeset cursor to watchput the short name of this card into CardNameput (the length of CardName) into StringLengthif hilight of me is truethenput offset (CardName & return,bg field "mail index") into TheCharif thechar = 0 then put CardName & return before bg field "Mail index"sort bg field "Mail index"elseput offset (CardName & return,bg field "mail index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength) of bg field "mail index"end ifend ifend updatemeon mouseenterFullBalloons showDirect,"Click me to add this record to your mailing" &&¬¨"list." & return & "(X = Marked to mail)"end mouseenter</script>
  425.     </part>
  426.     <part>
  427.         <id>23</id>
  428.         <type>button</type>
  429.         <visible> <true /> </visible>
  430.         <reserved5> 0 </reserved5>
  431.         <reserved4> 0 </reserved4>
  432.         <reserved3> 0 </reserved3>
  433.         <reserved2> 0 </reserved2>
  434.         <reserved1> 0 </reserved1>
  435.         <enabled> <true /> </enabled>
  436.         <rect>
  437.             <left>207</left>
  438.             <top>299</top>
  439.             <right>293</right>
  440.             <bottom>321</bottom>
  441.         </rect>
  442.         <style>checkbox</style>
  443.         <showName> <true /> </showName>
  444.         <highlight> <false /> </highlight>
  445.         <autoHighlight> <true /> </autoHighlight>
  446.         <sharedHighlight> <false /> </sharedHighlight>
  447.         <family>0</family>
  448.         <titleWidth>0</titleWidth>
  449.         <icon>0</icon>
  450.         <textAlign>center</textAlign>
  451.         <font>Chicago</font>
  452.         <textSize>12</textSize>
  453.         <textStyle>plain</textStyle>
  454.         <name>Business</name>
  455.         <script>on mouseUpplay "click"updatemesend dateit to bg field "lastmodified"end mouseupon updatemeset cursor to watchput the short name of this card into CardNameput (the length of CardName) into StringLengthif hilight of me is truethenput offset (CardName & return,bg field "business index") into TheCharif thechar = 0 then put CardName & return before bg field "business index"sort bg field "business index"put offset (CardName & return,bg field "people index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength)  of bg field "people index"end ifelseput offset (CardName & return,bg field "people index") into TheCharif thechar = 0 then put CardName & return before bg field "people index"sort bg field "people index"put offset (CardName & return,bg field "business index") into TheCharif thechar > 0 thenput empty into char (theChar) to (thechar + StringLength) of bg field "business index"end ifend ifend updatemeon mouseenterFullBalloons showDirect,"Click me to mark a record as a business record." &&¬¨"This adds the record to the Business Index" & return & "X = Business Record"end mouseenter</script>
  456.     </part>
  457.     <part>
  458.         <id>26</id>
  459.         <type>button</type>
  460.         <visible> <true /> </visible>
  461.         <reserved5> 0 </reserved5>
  462.         <reserved4> 0 </reserved4>
  463.         <reserved3> 0 </reserved3>
  464.         <reserved2> 0 </reserved2>
  465.         <reserved1> 0 </reserved1>
  466.         <enabled> <true /> </enabled>
  467.         <rect>
  468.             <left>541</left>
  469.             <top>202</top>
  470.             <right>582</right>
  471.             <bottom>256</bottom>
  472.         </rect>
  473.         <style>rectangle</style>
  474.         <showName> <true /> </showName>
  475.         <highlight> <false /> </highlight>
  476.         <autoHighlight> <true /> </autoHighlight>
  477.         <sharedHighlight> <true /> </sharedHighlight>
  478.         <family>0</family>
  479.         <titleWidth>0</titleWidth>
  480.         <icon>141</icon>
  481.         <textAlign>center</textAlign>
  482.         <font>Chicago</font>
  483.         <textSize>12</textSize>
  484.         <textStyle>plain</textStyle>
  485.         <name>Notes</name>
  486.         <script>on mouseUpplay clickset cursor to watchif there is not a window notesthenplay "swish1"set the locktext of bg field "notes" to truetextoid Notes,"bg field Notes",BigWindoidZoom,"0 0 0,65535 65535 52428",rect of bg field "Notes"¬¨,true,the textFont of bg field Notes,the textSize of bg field Notes,Plainset the textWrap of window notes to trueset the locktext of window notes to falseset dontsearch of bg field "notes" to falseelseshow window notesend ifend mouseUpon mouseenterFullBalloons showDirect,"This makes a floating window in which you can edit the information in the NOTES field."end mouseenter-- global IndexShow-- if visible of bg field "index" = true-- then-- set icon of bg button "HideIndex" to "Clicked Close Box"-- send mouseup to bg button "HideIndex"-- put "true" into IndexShow-- else put "false" into IndexShow-- set hilight of me to true-- set hilight of bg button "index" to false-- show bg field "Notes"-- show bg button " Notes"-- show bg button "Close"-- unlock screen with visual wipe up very fast-- set dontsearch of bg field "notes" to false</script>
  487.     </part>
  488.     <part>
  489.         <id>33</id>
  490.         <type>button</type>
  491.         <visible> <true /> </visible>
  492.         <reserved5> 0 </reserved5>
  493.         <reserved4> 0 </reserved4>
  494.         <reserved3> 0 </reserved3>
  495.         <reserved2> 0 </reserved2>
  496.         <reserved1> 0 </reserved1>
  497.         <enabled> <true /> </enabled>
  498.         <rect>
  499.             <left>587</left>
  500.             <top>367</top>
  501.             <right>619</right>
  502.             <bottom>399</bottom>
  503.         </rect>
  504.         <style>opaque</style>
  505.         <showName> <false /> </showName>
  506.         <highlight> <false /> </highlight>
  507.         <autoHighlight> <true /> </autoHighlight>
  508.         <sharedHighlight> <true /> </sharedHighlight>
  509.         <family>0</family>
  510.         <titleWidth>0</titleWidth>
  511.         <icon>136</icon>
  512.         <textAlign>center</textAlign>
  513.         <font>Chicago</font>
  514.         <textSize>12</textSize>
  515.         <textStyle>plain</textStyle>
  516.         <name>Next</name>
  517.         <script>on mouseDownplay "click"mouseStillDownend mouseDownon mouseStillDown-- lock screengo to next card of this background-- unlock screen with visual effect wipe left very fastend mouseStillDownon mouseenterFullBalloons showDirect,"Click me to go to the next record." &&¬¨"Hold down the mouse button to flip through records."end mouseenter</script>
  518.     </part>
  519.     <part>
  520.         <id>34</id>
  521.         <type>button</type>
  522.         <visible> <true /> </visible>
  523.         <reserved5> 0 </reserved5>
  524.         <reserved4> 0 </reserved4>
  525.         <reserved3> 0 </reserved3>
  526.         <reserved2> 0 </reserved2>
  527.         <reserved1> 0 </reserved1>
  528.         <enabled> <true /> </enabled>
  529.         <rect>
  530.             <left>548</left>
  531.             <top>367</top>
  532.             <right>580</right>
  533.             <bottom>399</bottom>
  534.         </rect>
  535.         <style>opaque</style>
  536.         <showName> <false /> </showName>
  537.         <highlight> <false /> </highlight>
  538.         <autoHighlight> <true /> </autoHighlight>
  539.         <sharedHighlight> <true /> </sharedHighlight>
  540.         <family>0</family>
  541.         <titleWidth>0</titleWidth>
  542.         <icon>137</icon>
  543.         <textAlign>center</textAlign>
  544.         <font>Chicago</font>
  545.         <textSize>12</textSize>
  546.         <textStyle>plain</textStyle>
  547.         <name>Prev</name>
  548.         <script>on mouseDownplay "click"mouseStillDownend mouseDownon mouseStillDown-- lock screengo to prev card of this background-- unlock screen with visual effect wipe right very fastend mouseStillDownon mouseenterFullBalloons showDirect,"Click me to go to the previous record." &&¬¨"Hold down the mouse button to flip through records."end mouseenter</script>
  549.     </part>
  550.     <part>
  551.         <id>36</id>
  552.         <type>button</type>
  553.         <visible> <true /> </visible>
  554.         <reserved5> 0 </reserved5>
  555.         <reserved4> 0 </reserved4>
  556.         <reserved3> 0 </reserved3>
  557.         <reserved2> 0 </reserved2>
  558.         <reserved1> 0 </reserved1>
  559.         <enabled> <true /> </enabled>
  560.         <rect>
  561.             <left>586</left>
  562.             <top>25</top>
  563.             <right>627</right>
  564.             <bottom>79</bottom>
  565.         </rect>
  566.         <style>rectangle</style>
  567.         <showName> <true /> </showName>
  568.         <highlight> <false /> </highlight>
  569.         <autoHighlight> <true /> </autoHighlight>
  570.         <sharedHighlight> <true /> </sharedHighlight>
  571.         <family>0</family>
  572.         <titleWidth>0</titleWidth>
  573.         <icon>134</icon>
  574.         <textAlign>center</textAlign>
  575.         <font>Chicago</font>
  576.         <textSize>12</textSize>
  577.         <textStyle>plain</textStyle>
  578.         <name>Delete</name>
  579.         <script>on mouseUpglobal mode,MoneyToDateplay clickset cursor to watchif (the commandKey is down) AND (mode = "addressbook")thenplay "warning"answer "Warning!  Because the COMMAND KEY was down you have entered"&&¬¨"a special delete mode for deleting many records without any warnings." & return &¬¨"Do you want to continue?" with "yes" or "Cancel"if it is Cancel then exit mouseupDeleteMultipleexit mouseupend ifif mode = "contribution"thenput FigureGifts && quote & the date & quote into TheMessagesend TheMessage to bg button "gifts"if moneytodate ‚↠0 thenplay "knock3"answer "This record cannot be deleted because it contains contribution information for this year." ¬¨&& "If you want to delete this record, you need to change all references to in the Deposit Reports."exit mouseupend ifend ifif the optionKey is not downthenplay "knock3"Answer "Are you sure you want to delete this record?"¬¨with "Yes" or "Cancel"if it = "Cancel" then exit mouseupend ifDeleteSingleend mouseUpon DeleteSingleset cursor to watchif the number of cards in this background = 1thenClearCardexit DeleteSingleend ifput the short name of this card into CardNameput (the length of CardName) into StringLength-- delete the cardName from either the business or people indexif hilight of bg button "business" is truethenput offset (CardName & return,bg field "business index") ¬¨into TheChardelete char (theChar) to (thechar + StringLength) ¬¨of bg field "business index"elseput offset (CardName & return,bg field "people index") ¬¨into TheChardelete char (theChar) to (thechar + StringLength) ¬¨of bg field "people index"end if-- delete the cardName from the mail indexif hilight of bg button "mail" is truethenput offset (CardName & return,bg field "mail index") ¬¨into TheChardelete char (theChar) to (thechar + StringLength) ¬¨of bg field "mail index"end if-- delete the cardName from the all records indexput offset (CardName & return,bg field "all records index") ¬¨into TheChardelete char (theChar) to (thechar + StringLength) ¬¨of bg field "all records index"-- actually delete the cardset cursor to watchlock screenpush next card of this bglock messagesplay "tear"put "domenu" && quote & "Delete Card" & quote into theMessagesend theMessage to HyperCardpop cardopencardend DeleteSingleon ClearCardif there is a window "notes" then close window "notes"if there is a window "gifts" then close window "gifts"send openfield to bg field Namerepeat with x = 1 to the number of bg fieldsif the locktext of bg field x is false then put empty into bg field xend repeatset hilight of bg button "business" to falseset hilight of bg button "mail" to falseput " Empty" into bg field "Name"send closefield to bg field "Name"end ClearCardon DeleteMultiple-- Answer "Do you want to delete marked cards or a range of cards?"¬¨-- with "Marked" or "Range" or "Cancel"-- if it = "Cancel" then exit DeleteMultiple-- put it into TypeDeleteput "Range" into TypeDelete -- don't give user a choice----- Answer "Do you want to delete protected cards and backgrounds?"¬¨-- with "Yes" or "No" or "Cancel"-- if it = "Cancel" then exit DeleteMultiple-- put it into DeProtectput "no" into DeProtect -- don't give user a choice---if TypeDelete = "Range" then DeleteRange DeProtectelse DeleteMarked DeProtecthide messageglobal NewRecordput "true" into NewRecordend DeleteMultipleon DeleteRange DeProtectset lockMessages to trueset lockRecent to trueput the number of the first card of this bg -1 into StartNoput number of this card - startno into ThisCardNoput the number of cards in this bg into LastCardNoask "Enter the number of the card you wish to start with?"¬¨with ThisCardNoif it < 1 then exit DeleteRangeif it is empty then exit DeleteRangeif it is not a number then exit DeleteRangeput it into StartCardgo to card startCard of this bg---ask "Enter the number of the card you wish to end with?"¬¨with LastCardNoif it > LastCardNo then exit DeleteRangeif it < startCard then exit DeleteRangeif it is empty then exit DeleteRangeif it is not a number then exit DeleteRangeput it into endCard---set cursor to watchlock screenrepeat with i = startCard to endCardif DeProtect = "Yes"thenset cantDelete of this card to Falseput "unpotecting card" && the short name of this cardset cantDelete of this background to Falseput "unpotecting background" && the short name of this bgend ifput "deleting card" && the short name of this cardif the number of cards in this bg = 1 then ClearCardelseput "domenu" && quote & "Delete Card" & quote into theMessagesend theMessage to HyperCardend ifend repeatgo to last card of bg "Records"send "repairStack" to bg button "Repair" -- creates indexes & a little  moreend DeleteRangeon mouseenterFullBalloons showDirect,"‚Ä¢ Click me to delete this record." & return & ¬¨"‚Ä¢ Hold down the OPTION KEY when clicking if you want to skip warning." & return &¬¨"‚Ä¢ Hold down the COMMAND KEY to delete multiple records."end mouseenter</script>
  580.     </part>
  581.     <part>
  582.         <id>40</id>
  583.         <type>button</type>
  584.         <visible> <true /> </visible>
  585.         <reserved5> 0 </reserved5>
  586.         <reserved4> 0 </reserved4>
  587.         <reserved3> 0 </reserved3>
  588.         <reserved2> 0 </reserved2>
  589.         <reserved1> 0 </reserved1>
  590.         <enabled> <true /> </enabled>
  591.         <rect>
  592.             <left>541</left>
  593.             <top>25</top>
  594.             <right>582</right>
  595.             <bottom>79</bottom>
  596.         </rect>
  597.         <style>rectangle</style>
  598.         <showName> <true /> </showName>
  599.         <highlight> <false /> </highlight>
  600.         <autoHighlight> <true /> </autoHighlight>
  601.         <sharedHighlight> <true /> </sharedHighlight>
  602.         <family>0</family>
  603.         <titleWidth>0</titleWidth>
  604.         <icon>138</icon>
  605.         <textAlign>center</textAlign>
  606.         <font>Chicago</font>
  607.         <textSize>12</textSize>
  608.         <textStyle>plain</textStyle>
  609.         <name>New</name>
  610.         <script>on mouseupplay clickaddRecordend mouseup-- on mouseUp-- ask "Please enter the name for this new record" & return & "(Last,First):"-- repeat-- if it is empty then exit Mouseup-- if char 1 of it = " " then delete char 1 of it-- else exit repeat-- end repeat-- send SwitchON to bg button "Sort"-- AddNewCard it-- -- set icon of bg button sort to "sort"-- end mouseUpon mouseenterFullBalloons showDirect,"Click me to add a new record."end mouseenter</script>
  611.     </part>
  612.     <part>
  613.         <id>43</id>
  614.         <type>button</type>
  615.         <visible> <true /> </visible>
  616.         <reserved5> 0 </reserved5>
  617.         <reserved4> 0 </reserved4>
  618.         <reserved3> 0 </reserved3>
  619.         <reserved2> 0 </reserved2>
  620.         <reserved1> 0 </reserved1>
  621.         <enabled> <true /> </enabled>
  622.         <rect>
  623.             <left>586</left>
  624.             <top>285</top>
  625.             <right>627</right>
  626.             <bottom>339</bottom>
  627.         </rect>
  628.         <style>rectangle</style>
  629.         <showName> <true /> </showName>
  630.         <highlight> <false /> </highlight>
  631.         <autoHighlight> <true /> </autoHighlight>
  632.         <sharedHighlight> <true /> </sharedHighlight>
  633.         <family>0</family>
  634.         <titleWidth>0</titleWidth>
  635.         <icon>135</icon>
  636.         <textAlign>center</textAlign>
  637.         <font>Chicago</font>
  638.         <textSize>12</textSize>
  639.         <textStyle>plain</textStyle>
  640.         <name>Find</name>
  641.         <script>on mouseUpplay "click"set cursor to watchif the OptionKey is not down then findItelse FindAgainend mouseUpon mouseenterFullBalloons showDirect,"Lets you perform word searches." & return &¬¨"Notes:" & return &¬¨"‚Ä¢ If you type multiple words and select" &&¬¨"'partial word' the search will find any record that contains" &&¬¨"all the words anywhere in the record." & return & ¬¨"‚Ä¢ OPTION KEY & click =" &&¬¨"find again."  -- & return & "‚Ä¢ NOTES window is ignored unless visible."end mouseenter</script>
  642.     </part>
  643.     <part>
  644.         <id>44</id>
  645.         <type>field</type>
  646.         <visible> <false /> </visible>
  647.         <dontWrap> <true /> </dontWrap>
  648.         <dontSearch> <false /> </dontSearch>
  649.         <sharedText> <true /> </sharedText>
  650.         <fixedLineHeight> <true /> </fixedLineHeight>
  651.         <autoTab> <false /> </autoTab>
  652.         <lockText> <true /> </lockText>
  653.         <rect>
  654.             <left>77</left>
  655.             <top>143</top>
  656.             <right>197</right>
  657.             <bottom>295</bottom>
  658.         </rect>
  659.         <style>scrolling</style>
  660.         <autoSelect> <false /> </autoSelect>
  661.         <showLines> <false /> </showLines>
  662.         <wideMargins> <true /> </wideMargins>
  663.         <multipleLines> <false /> </multipleLines>
  664.         <reservedFamily> 0 </reservedFamily>
  665.         <titleWidth>0</titleWidth>
  666.         <icon>0</icon>
  667.         <textAlign>left</textAlign>
  668.         <font>Helvetica</font>
  669.         <textSize>10</textSize>
  670.         <textStyle>plain</textStyle>
  671.         <textHeight>13</textHeight>
  672.         <name>All Records Index</name>
  673.         <script>on mouseuphide meend mouseup</script>
  674.     </part>
  675.     <part>
  676.         <id>56</id>
  677.         <type>button</type>
  678.         <visible> <true /> </visible>
  679.         <reserved5> 0 </reserved5>
  680.         <reserved4> 0 </reserved4>
  681.         <reserved3> 0 </reserved3>
  682.         <reserved2> 0 </reserved2>
  683.         <reserved1> 0 </reserved1>
  684.         <enabled> <true /> </enabled>
  685.         <rect>
  686.             <left>541</left>
  687.             <top>285</top>
  688.             <right>582</right>
  689.             <bottom>339</bottom>
  690.         </rect>
  691.         <style>rectangle</style>
  692.         <showName> <true /> </showName>
  693.         <highlight> <false /> </highlight>
  694.         <autoHighlight> <true /> </autoHighlight>
  695.         <sharedHighlight> <true /> </sharedHighlight>
  696.         <family>0</family>
  697.         <titleWidth>0</titleWidth>
  698.         <icon>139</icon>
  699.         <textAlign>center</textAlign>
  700.         <font>Chicago</font>
  701.         <textSize>12</textSize>
  702.         <textStyle>plain</textStyle>
  703.         <name>Index</name>
  704.         <script>on mouseDownglobal IndexType,DontShowput False into DontShowend mousedownon mousestilldownglobal IndexType,DontShowput False into DontShowput "All Records Index,Business Index,People Index,Mail Index" into TheListrepeat with x = 1 to the number of items in TheListif IndexType = item x of TheListthenput x into SelectNumberexit repeatend ifend repeatif the mouse is not down then exit mousestilldownget FullHPop(TheList,1,SelectNumber)if it ‚↠emptythenplay "click"if there is a menuItem IndexType of menu "Go"then set checkMark of menuItem IndexType of menu "Go" to falseput item 1 of it into IndexTypeput indexType into bg field "IndexType"if there is a menuItem IndexType of menu "Go"then set checkMark of menuItem IndexType of menu "Go" to trueshowIndexput true into DontShowelseexit mousestilldownend ifend mousestilldownon mouseupglobal  DontShowif DontShow is not true thenplay "click"showIndexend ifend mouseupon showIndexglobal IndexTypeset cursor to watchput "All Records Index,Business Index,People Index,Mail Index" into TheListif indexType is not in TheListthenput "All Records Index" into indexTypeset checkMark of menuItem IndexType of menu "Go" to trueend if-------------------------------------------------------------------------checkIndex -- compares length of all records index to number of cards in this bgget ListDialog(1,IndexType &" / Type Name or Select:",bg field IndexType,false,,," New ")-- get XScrollBox(1,IndexType &" / Type Name or Select:",bg field IndexType," New ")if it is cancel then exit showIndexif it = " New " then send mouseup to bg button "new"else if it is not emptythenset cursor to watchdelete item 1 of it-- lock screengo cd it-- unlock screen with visual effect scroll down fastend ifend showIndexon checkIndexput "all records index" into indextypeif the number of lines in bg field IndexType ‚↠number of cards in this bgthensend "RepairStack" to bg button "repair" -- the indexes are screwed up and need to be fixedend ifend checkIndexon mouseenterglobal IndexTypeFullBalloons showDirect,"Click me to show current index. (" & IndexType & ")" & return &¬¨"Hold down the mouse to get a pop up menu to choose a different index."end mouseenter</script>
  705.     </part>
  706.     <part>
  707.         <id>132</id>
  708.         <type>button</type>
  709.         <visible> <true /> </visible>
  710.         <reserved5> 0 </reserved5>
  711.         <reserved4> 0 </reserved4>
  712.         <reserved3> 0 </reserved3>
  713.         <reserved2> 0 </reserved2>
  714.         <reserved1> 0 </reserved1>
  715.         <enabled> <true /> </enabled>
  716.         <rect>
  717.             <left>586</left>
  718.             <top>202</top>
  719.             <right>627</right>
  720.             <bottom>256</bottom>
  721.         </rect>
  722.         <style>rectangle</style>
  723.         <showName> <true /> </showName>
  724.         <highlight> <false /> </highlight>
  725.         <autoHighlight> <true /> </autoHighlight>
  726.         <sharedHighlight> <true /> </sharedHighlight>
  727.         <family>0</family>
  728.         <titleWidth>0</titleWidth>
  729.         <icon>147</icon>
  730.         <textAlign>center</textAlign>
  731.         <font>Chicago</font>
  732.         <textSize>12</textSize>
  733.         <textStyle>plain</textStyle>
  734.         <name>Help</name>
  735.         <script>on mouseUpplay "click"helpend mouseUpon mouseenterFullBalloons showDirect,"Click to view online help."end mouseenter</script>
  736.     </part>
  737.     <part>
  738.         <id>62</id>
  739.         <type>button</type>
  740.         <visible> <true /> </visible>
  741.         <reserved5> 0 </reserved5>
  742.         <reserved4> 0 </reserved4>
  743.         <reserved3> 0 </reserved3>
  744.         <reserved2> 0 </reserved2>
  745.         <reserved1> 0 </reserved1>
  746.         <enabled> <true /> </enabled>
  747.         <rect>
  748.             <left>541</left>
  749.             <top>142</top>
  750.             <right>582</right>
  751.             <bottom>196</bottom>
  752.         </rect>
  753.         <style>rectangle</style>
  754.         <showName> <true /> </showName>
  755.         <highlight> <false /> </highlight>
  756.         <autoHighlight> <true /> </autoHighlight>
  757.         <sharedHighlight> <true /> </sharedHighlight>
  758.         <family>0</family>
  759.         <titleWidth>0</titleWidth>
  760.         <icon>131</icon>
  761.         <textAlign>center</textAlign>
  762.         <font>Chicago</font>
  763.         <textSize>12</textSize>
  764.         <textStyle>plain</textStyle>
  765.         <name>Return</name>
  766.         <script>on mouseUpplay clickset cursor to watchif there is not a window "Return_Address"thenput "Bg Field" && Quote & "Return_Address" & Quote into TheFieldtextoid "Return_Address",TheField,BigWindoid,"0 0 0,65535 65535 52428",rect of bg field "Return_Address"¬¨,true,the textFont of bg field "Return_Address",the textSize of bg field "Return_Address",Plainset the textWrap of window "Return_Address" to trueset the locktext of window "Return_Address" to falseelseshow window "Return_Address"end ifend mouseUpon mouseenterFullBalloons showDirect,"Edit return address information." & return &¬¨"Note: You can use fully styled text for your return address with any fonts."end mouseenter</script>
  767.     </part>
  768.     <part>
  769.         <id>63</id>
  770.         <type>field</type>
  771.         <visible> <false /> </visible>
  772.         <dontWrap> <false /> </dontWrap>
  773.         <dontSearch> <true /> </dontSearch>
  774.         <sharedText> <true /> </sharedText>
  775.         <fixedLineHeight> <false /> </fixedLineHeight>
  776.         <autoTab> <false /> </autoTab>
  777.         <lockText> <true /> </lockText>
  778.         <rect>
  779.             <left>113</left>
  780.             <top>104</top>
  781.             <right>376</right>
  782.             <bottom>201</bottom>
  783.         </rect>
  784.         <style>rectangle</style>
  785.         <autoSelect> <false /> </autoSelect>
  786.         <showLines> <false /> </showLines>
  787.         <wideMargins> <false /> </wideMargins>
  788.         <multipleLines> <false /> </multipleLines>
  789.         <reservedFamily> 0 </reservedFamily>
  790.         <titleWidth>0</titleWidth>
  791.         <icon>0</icon>
  792.         <textAlign>left</textAlign>
  793.         <font>Times</font>
  794.         <textSize>14</textSize>
  795.         <textStyle>plain</textStyle>
  796.         <textHeight>14</textHeight>
  797.         <name>Return_Address</name>
  798.         <script>on mouseuphide meend mouseup</script>
  799.     </part>
  800.     <part>
  801.         <id>67</id>
  802.         <type>button</type>
  803.         <visible> <false /> </visible>
  804.         <reserved5> 0 </reserved5>
  805.         <reserved4> 0 </reserved4>
  806.         <reserved3> 0 </reserved3>
  807.         <reserved2> 0 </reserved2>
  808.         <reserved1> 0 </reserved1>
  809.         <enabled> <true /> </enabled>
  810.         <rect>
  811.             <left>0</left>
  812.             <top>352</top>
  813.             <right>32</right>
  814.             <bottom>397</bottom>
  815.         </rect>
  816.         <style>transparent</style>
  817.         <showName> <true /> </showName>
  818.         <highlight> <false /> </highlight>
  819.         <autoHighlight> <true /> </autoHighlight>
  820.         <sharedHighlight> <true /> </sharedHighlight>
  821.         <family>0</family>
  822.         <titleWidth>0</titleWidth>
  823.         <icon>12195</icon>
  824.         <textAlign>center</textAlign>
  825.         <font>Chicago</font>
  826.         <textSize>12</textSize>
  827.         <textStyle>plain</textStyle>
  828.         <name>old file</name>
  829.         <script>on mouseUp-- hide meset lockMessages to trueset lockRecent to trueanswer "Do you want to EXPORT to or IMPORT from a TEXT file?"¬¨with "IMPORT" or "EXPORT" OR "Cancel"set cursor to watchif it is empty then exit mouseupelse if it = "IMPORT" then importTextelse if it = "Export" then exportTextend mouseUpon importTextset lockMessages to trueset lockRecent to true-- Select the Text File to Import ----------answer file "Select a text file:" of type "TEXT"set cursor to watchif it is empty then exit to hypercardput it into inFileopen file infileread from file infile until returnclose file infileif it =  "COOL ADDRESS BOOK FILE" & returnthen ImportCoolText inFileelse importText inFileend importTexton ImportCoolText inFile--------------------------------------------------------------------- USES LOCAL VARIABLES:-- Infile = path to the TEXT file to be used-- Countfields = Number of fields in the imported TEXT file-- FieldList = Names of bg fields in the order they will be used-- InFileText = Total contents of inFile-- ItemNo = Number of items being examined or transfered from inFileText-- recordNo = the number of the currently imported record---------------------------------------------------------------------------------------------------------------------------------------- READS ENTIRE TEXT INTO VARIALBE inFileText AND SETS IT UP-------------------------------------------------------------------answer "This is a text file form an older version of this program.  It will now be imported."¬¨& return & return & "Note: This kind of import works best if the address book is empty."set cursor to watchopen file inFileread from file inFile until endclose file inFileput it into inFileTextdelete first line of inFileText -- DELETES THE FILE TYPE INFORMATIONlock screenpush card--------------------------------------------------------------------- PUTS THE INFORMATION INTO THE APPROPRIATE CARD FIELDS-------------------------------------------------------------------set the itemDelimiter to tab -- NEEDED TO PROPERLY READ FROM inFileTextput 0 into itemNoput 0 into RecordNorepeat --WILL JUMP OUT OF REPEAT LOOP AT THE END OF THE FIELDadd 1 to recordNoadd 1 to ItemNoput item ItemNo of inFileText into RoughNameput Checkcommas(RoughName) into RoughNameif there is a card RoughName of this bg thenput "Record Exists - skipping record" && recordNo && "--" && roughnameadd 13 to ItemNonext repeatend ifsend "AddNewCard" to bg button "new"send "dateit" to bg field "dateCreated"set cursor to busyput "Importing record" && recordNo && "--" && item (itemNo ) of inFileTextput item ItemNo of inFileText into bg field "name"add 1 to ItemNoput item ItemNo of inFileText into bg field "POBox"add 1 to ItemNoput item ItemNo of inFileText into bg field "Street"add 1 to ItemNoput item ItemNo of inFileText into bg field "CityState"add 1 to ItemNoput item ItemNo of inFileText into bg field "ZIP"add 1 to ItemNoput item ItemNo of inFileText into bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into line 2 of bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into line 3 of bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into line 4 of bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into bg field "special dates"add 1 to ItemNoput item ItemNo of inFileText into bg field "notes"-- set the name of this card to bg field "Name"--------------------------------------------------------------------- SETS THE BG BUTTONS TO APPROPRIATE SETTINGS-------------------------------------------------------------------add 2 to ItemNoif item itemNo of inFileText = "false"then set hilight of bg button "business" to falseelse set hilight of bg button "business" to trueadd 1 to ItemNoif item itemNo of inFileText = "false"then set hilight of bg button "Mail" to falseelse set hilight of bg button "Mail" to truesend closefield to bg field "name"if ItemNO = the number of items in inFileText then exit repeatend repeatpop cardhide messagesend RepairStack to bg button "repair"play "crystal2"end ImportCoolTexton importText inFile-- Uses local variables:-- Infile = path to the TEXT file to be used-- Countfields = Number of fields in the imported TEXT file-- FieldList = Names of bg fields in the order they will be used--------------------------------------------set lockMessages to falseset cursor to watch---------------------------------------------- countFields of the TEXT Fileput 0 into countFieldsopen file inFileput "dummy" into itrepeat until it is emptyread from file inFile until tabadd 1 to countFieldsif it contains return thenexit repeatend ifend repeatclose file inFile------------------------------------------------------------------------------------------ lining up incomming fields with bg fieldsopen file inFilerepeat with x = 1 to countFields - 1read from file inFile until tabdelete last character of itPut "Please choose field for, '" & it & "'" into Dialogueget chooseBGfield (Dialogue)put it & return After FieldListend repeat-- this does the same for the last fieldread from file inFile until returnPut "Please choose field for, '" & it & "'" into Dialogueget chooseBGfield (Dialogue)put it & return After FieldListclose file inFile-- all done!--------------------------------------------------------------------------open file inFileput 1 into recNum-- loops through the cards & fields until the end of file-- this usually creates one or two extra cards, but it-- was easy to code.put "dummy" into itrepeat until it is emptyput "Now on record #" & recNumdomenu "new card"repeat with x = 1 to countFields -1read from file inFile until tab-- this line removes the tabdelete last character of itrepeat while it contains quotedelete char offset(quote,it) of itend repeatput line x of FieldList into FieldNameif field FieldName is empty then put it into field FieldNameelse put "," & it after field FieldNameend repeat-- now do the same for the last fieldread from file inFile until returnput line (x+1) of FieldList into FieldNameif field FieldName is empty then put it into field FieldNameelse put "," & it after field FieldNameput empty into field "Don't Use"add 1 to recNumend repeatclose file inFile-- ALL DONE!hide messageanswer "Done!" && recNum && "records written" with "Ok"end importTexton exportText--------------------------------------------------------------------- THIS EXPORT TEXT IN SUCH A WAY THAT IT CAN ONLY BE PROPERLY ------ IMPORTED BY ANOTER COOL ADDRESS BOOK PROGRAM ----------------------------------------------------------------------------------------------------------------------------------------------------------- ASK FOR A NAME FOR THE TEXT FILE AND PUT IT INTO outFile --------- AND SETS UP A VARIABLE IN WHICH TO STORE ALL THE TEXT UNTIL ------ IT IS ACTUALLY TIME TO WRITE THE FILE IN outFileText ------------------------------------------------------------------------------set cursor to watchset lockMessages to trueset lockRecent to trueask file "My TEXT Backup"if it is empty then exit exportTextput it into outFileput empty into outFileTextset cursor to watch--------------------------------------------------------------------- PUTS LIST OF BG FIELD NAMES INTO TheLine ------------------------------------------------------------------------------------------repeat with b = 1 to the number of bg fieldsif lockText of bg field b = falsethen-- put quote after TheLineput the short name of bg field b after TheLine-- put quote after TheLineput tab after TheLineend ifend repeat -- end b repeat-- put return after TheLine--------------------------------------------------------------------- PUTS CONTENTS OF ALL UNLOCKED BG FIELD OF ALL CARDS INTO TheLine-- ALSO PUTS INFORMATION FROM Business AND Mail BUTTONS INTO theLine-- PUTS EACH LINE INTO outFileText-------------------------------------------------------------------repeat with x = 1 to the number of cards of this bgset cursor to busyput "Working on record" && x &&"out of" && the number of cards of this bgput empty into TheLinerepeat with y = 1 to the number of bg fieldsif lockText of bg field y of card x of this bg = falsethenif bg field y of card x of this bg is not emptythen-- put quote after TheLineput bg field y of card x of this bg after TheLine-- put quote after TheLineend ifput tab after TheLineend ifend repeat -- end y repeatput hilight of bg button "Business" of card x of this bg after TheLineput tab after TheLineput hilight of bg button "Mail" of card x of this bg after TheLineput tab after TheLine-- put Return after TheLineput Theline after OutFileTextend repeat  -- end x repeat--------------------------------------------------------------------- PUTS A HEADER LINE B4 outFileText SO THE FILE WILL BE RECOGNIZED-- AS A "COOL ADDRESS BOOK FILE".  THEN IT WRITES THE CONTENTS OF-- outFileText TO FILE outFile-------------------------------------------------------------------put "Saving information as" && outFilePut "COOL ADDRESS BOOK FILE" & return before outFileTextopen file outFilewrite outFileText to file outFileclose file outFilehide messageend exportText</script>
  830.     </part>
  831.     <part>
  832.         <id>78</id>
  833.         <type>field</type>
  834.         <visible> <false /> </visible>
  835.         <dontWrap> <false /> </dontWrap>
  836.         <dontSearch> <false /> </dontSearch>
  837.         <sharedText> <true /> </sharedText>
  838.         <fixedLineHeight> <false /> </fixedLineHeight>
  839.         <autoTab> <false /> </autoTab>
  840.         <lockText> <true /> </lockText>
  841.         <rect>
  842.             <left>274</left>
  843.             <top>122</top>
  844.             <right>392</right>
  845.             <bottom>142</bottom>
  846.         </rect>
  847.         <style>transparent</style>
  848.         <autoSelect> <false /> </autoSelect>
  849.         <showLines> <false /> </showLines>
  850.         <wideMargins> <false /> </wideMargins>
  851.         <multipleLines> <false /> </multipleLines>
  852.         <reservedFamily> 0 </reservedFamily>
  853.         <titleWidth>0</titleWidth>
  854.         <icon>0</icon>
  855.         <textAlign>left</textAlign>
  856.         <font>Geneva</font>
  857.         <textSize>12</textSize>
  858.         <textStyle>plain</textStyle>
  859.         <textHeight>16</textHeight>
  860.         <name>IndexType</name>
  861.         <script>on mouseuphide meend mouseup</script>
  862.     </part>
  863.     <part>
  864.         <id>87</id>
  865.         <type>field</type>
  866.         <visible> <true /> </visible>
  867.         <dontWrap> <true /> </dontWrap>
  868.         <dontSearch> <true /> </dontSearch>
  869.         <sharedText> <false /> </sharedText>
  870.         <fixedLineHeight> <true /> </fixedLineHeight>
  871.         <autoTab> <true /> </autoTab>
  872.         <lockText> <true /> </lockText>
  873.         <rect>
  874.             <left>541</left>
  875.             <top>344</top>
  876.             <right>629</right>
  877.             <bottom>366</bottom>
  878.         </rect>
  879.         <style>shadow</style>
  880.         <autoSelect> <false /> </autoSelect>
  881.         <showLines> <false /> </showLines>
  882.         <wideMargins> <false /> </wideMargins>
  883.         <multipleLines> <false /> </multipleLines>
  884.         <reservedFamily> 0 </reservedFamily>
  885.         <titleWidth>0</titleWidth>
  886.         <icon>0</icon>
  887.         <textAlign>center</textAlign>
  888.         <font>Times</font>
  889.         <textSize>12</textSize>
  890.         <textStyle>bold</textStyle>
  891.         <textHeight>16</textHeight>
  892.         <name>‚Ä¢RecordNo</name>
  893.         <script>on mouseDown-- play "click"end mouseDownon mouseupplay "click"set cursor to watchask "Go to record #:"set cursor to watch-- lock screengo card it of this bg-- unlock screen with visual scroll down very fastif the optionkey is down then doobiedooend mouseupon mouseenterFullBalloons showDirect,"I show the current record and total" &&¬¨"number of records.  Click me to jump to any record by number."end mouseenteron doobiedoo-- unlock screen-- repeat with x = 1 to the number of cards in this bg-- go card x of this bg-- end repeatend doobiedoo</script>
  894.     </part>
  895.     <part>
  896.         <id>89</id>
  897.         <type>field</type>
  898.         <visible> <true /> </visible>
  899.         <dontWrap> <false /> </dontWrap>
  900.         <dontSearch> <false /> </dontSearch>
  901.         <sharedText> <true /> </sharedText>
  902.         <fixedLineHeight> <false /> </fixedLineHeight>
  903.         <autoTab> <false /> </autoTab>
  904.         <lockText> <true /> </lockText>
  905.         <rect>
  906.             <left>61</left>
  907.             <top>0</top>
  908.             <right>573</right>
  909.             <bottom>19</bottom>
  910.         </rect>
  911.         <style>transparent</style>
  912.         <autoSelect> <false /> </autoSelect>
  913.         <showLines> <false /> </showLines>
  914.         <wideMargins> <false /> </wideMargins>
  915.         <multipleLines> <false /> </multipleLines>
  916.         <reservedFamily> 0 </reservedFamily>
  917.         <titleWidth>0</titleWidth>
  918.         <icon>0</icon>
  919.         <textAlign>center</textAlign>
  920.         <font>Chicago</font>
  921.         <textSize>12</textSize>
  922.         <textStyle>outline</textStyle>
  923.         <textHeight>16</textHeight>
  924.         <name>‚Ä¢Label</name>
  925.         <script></script>
  926.     </part>
  927.     <part>
  928.         <id>91</id>
  929.         <type>button</type>
  930.         <visible> <true /> </visible>
  931.         <reserved5> 0 </reserved5>
  932.         <reserved4> 0 </reserved4>
  933.         <reserved3> 0 </reserved3>
  934.         <reserved2> 0 </reserved2>
  935.         <reserved1> 0 </reserved1>
  936.         <enabled> <true /> </enabled>
  937.         <rect>
  938.             <left>0</left>
  939.             <top>0</top>
  940.             <right>21</right>
  941.             <bottom>18</bottom>
  942.         </rect>
  943.         <style>transparent</style>
  944.         <showName> <false /> </showName>
  945.         <highlight> <false /> </highlight>
  946.         <autoHighlight> <false /> </autoHighlight>
  947.         <sharedHighlight> <true /> </sharedHighlight>
  948.         <family>0</family>
  949.         <titleWidth>0</titleWidth>
  950.         <icon>132</icon>
  951.         <textAlign>center</textAlign>
  952.         <font>Chicago</font>
  953.         <textSize>12</textSize>
  954.         <textStyle>plain</textStyle>
  955.         <name>The Close Box</name>
  956.         <script>on mouseUpglobal modeif icon of me = 133thenplay "click"set icon of me to "Close Box2"set cursor to watchvisual effect zoom close fastput "Please wait..."-- go card 1lock screenif mode = "contribution" thenpop card into CardRefif cardref contains the short name of this stack then go cardrefelse go card go card "Contribution Title Screen"else if mode = "AddressBook" then Go card "Address Title Screen"else go card 2hide messageend ifend mouseUpon mousedown-- set icon of me to "Clicked Close Box2"repeat while the mouse is downif the mouseV < top of me then set icon of me to "Close Box2"elseif the mouseV > Bottom of me then set icon of me to "Close Box2"elseif the mouseH < Left of me then set icon of me to "Close Box2"elseif the mouseH > right of me then set icon of me to "Close Box2"else set icon of me to "Clicked Close Box2"end ifend ifend ifend repeatend Mousedownon mouseenterFullBalloons showDirect,"Click me to go to the main screen."end mouseenter</script>
  957.     </part>
  958.     <part>
  959.         <id>97</id>
  960.         <type>button</type>
  961.         <visible> <false /> </visible>
  962.         <reserved5> 0 </reserved5>
  963.         <reserved4> 0 </reserved4>
  964.         <reserved3> 0 </reserved3>
  965.         <reserved2> 0 </reserved2>
  966.         <reserved1> 0 </reserved1>
  967.         <enabled> <true /> </enabled>
  968.         <rect>
  969.             <left>586</left>
  970.             <top>202</top>
  971.             <right>627</right>
  972.             <bottom>256</bottom>
  973.         </rect>
  974.         <style>rectangle</style>
  975.         <showName> <true /> </showName>
  976.         <highlight> <false /> </highlight>
  977.         <autoHighlight> <true /> </autoHighlight>
  978.         <sharedHighlight> <true /> </sharedHighlight>
  979.         <family>0</family>
  980.         <titleWidth>0</titleWidth>
  981.         <icon>130</icon>
  982.         <textAlign>center</textAlign>
  983.         <font>Chicago</font>
  984.         <textSize>12</textSize>
  985.         <textStyle>plain</textStyle>
  986.         <name>Gifts</name>
  987.         <script>on mouseUpplay "click"updatethewindowend mouseUpon mouseenterFullBalloons showDirect,"Click to view contribution information for this record."end mouseenteron updatethewindowset cursor to watchFIGUREGIFTSif there is a window gifts then set text of window gifts to bg field giftselseplay "swish1"textoid Gifts,"bg field Gifts",BigWindoidZoom,"0 0 0,65535 65535 52428",rect of bg field "Gifts"¬¨,false,the textFont of bg field Gifts,the textSize of bg field Gifts,Plainset dontsearch of bg field gifts to falseend ifend updatethewindowON FigureGifts IncludeDateglobal GIFTStoDATE -- used by statement generatorglobal MoneyToDate -- used by delete buttonput 0 into MoneyToDateif IncludeDate is empty thenif the optionKey is down thenask "Please Enter A Date:"if it is a date thenput it into IncludeDateelsebeepput the date into IncludeDateend ifelseput the date into IncludeDateend ifend ifconvert IncludeDate to secondsput the short name of this card into TheNameset itemDelimiter to tabput 1 into Zput empty into TheGiftsput 0 into TotalTaxGiftsrepeat with x = 1 to the number of cards in bg "reports"set cursor to busyput bg field "Account Summary" of card x of bg "reports" into PageSummaryput bg field "date" of card x of bg "reports" into PageDateput PageDate into PageDateSecondsconvert PageDateSeconds to secondsIf PageDateSeconds > IncludeDate then next repeatif theName is in PageSummarythenrepeat with y = 1 to the number of lines in PageSummaryif item 1 of line y of PageSummary = theName thenput PageDate & tab & line y of PageSummary into Line z of TheGifts -- adds the datedelete item 2 of line z of TheGifts -- deletes the nameadd item 2 of line z of TheGifts to MoneyToDate -- used by delete buttonif last item of line z of TheGifts = "deductible"then add item 2 of line z of TheGifts to TotalTaxGifts -- later put into GiftsToDateput formatNumPadded(item 2 of line z of TheGifts,0,2) into item 2 of line z of TheGiftsadd 1 to Zend ifend repeatend ifend repeatput "Date" & tab & "Amount" & tab & "Fund" & tab & "Form" & Tab & "Tax Info" & return before theGiftsif theGifts is not empty then put align(TheGifts,"10,L, ","10,R,  ","16,L, ","12,L, ","15,L, ") into TheGiftsPUT TotalTaxGifts into GIFTStoDATEput formatNumPadded(TotalTaxGifts,1,2) into TotalTaxGiftsconvert IncludeDate to short dateput "Total Deductible Gifts Through" && INcludeDate & ":" && TotalTaxGifts & return & return before TheGiftsput line 1 of bg field "‚Ä¢AddressSummary" & return before TheGiftsput TheGifts into bg field "gifts"set itemDelimiter to ","end FigureGifts</script>
  988.     </part>
  989.     <part>
  990.         <id>100</id>
  991.         <type>button</type>
  992.         <visible> <true /> </visible>
  993.         <reserved5> 0 </reserved5>
  994.         <reserved4> 0 </reserved4>
  995.         <reserved3> 0 </reserved3>
  996.         <reserved2> 0 </reserved2>
  997.         <reserved1> 0 </reserved1>
  998.         <enabled> <false /> </enabled>
  999.         <rect>
  1000.             <left>541</left>
  1001.             <top>261</top>
  1002.             <right>626</right>
  1003.             <bottom>281</bottom>
  1004.         </rect>
  1005.         <style>rectangle</style>
  1006.         <showName> <true /> </showName>
  1007.         <highlight> <false /> </highlight>
  1008.         <autoHighlight> <true /> </autoHighlight>
  1009.         <sharedHighlight> <false /> </sharedHighlight>
  1010.         <family>0</family>
  1011.         <titleWidth>0</titleWidth>
  1012.         <icon>0</icon>
  1013.         <textAlign>center</textAlign>
  1014.         <font>Chicago</font>
  1015.         <textSize>12</textSize>
  1016.         <textStyle>plain</textStyle>
  1017.         <name>Sort</name>
  1018.         <script>on mousedownplay "click"end mousedownon mouseupupdateSortend mouseupon SwitchOn-- set icon of me to "sort2"enable meenable menuitem "sort records" of menu "Edit"end SwitchONon SwitchOff-- set icon of me to "sortGrey2"disable medisable menuitem "sort records" of menu "Edit"end SwitchOffon mouseenterFullBalloons showDirect,"Click me to sort the records." & return &¬¨"Note: This is done automatically when there is a break" &&¬¨"in activity."end mouseenter</script>
  1019.     </part>
  1020.     <part>
  1021.         <id>101</id>
  1022.         <type>field</type>
  1023.         <visible> <false /> </visible>
  1024.         <dontWrap> <true /> </dontWrap>
  1025.         <dontSearch> <false /> </dontSearch>
  1026.         <sharedText> <true /> </sharedText>
  1027.         <fixedLineHeight> <true /> </fixedLineHeight>
  1028.         <autoTab> <false /> </autoTab>
  1029.         <lockText> <true /> </lockText>
  1030.         <rect>
  1031.             <left>198</left>
  1032.             <top>142</top>
  1033.             <right>319</right>
  1034.             <bottom>294</bottom>
  1035.         </rect>
  1036.         <style>scrolling</style>
  1037.         <autoSelect> <false /> </autoSelect>
  1038.         <showLines> <false /> </showLines>
  1039.         <wideMargins> <true /> </wideMargins>
  1040.         <multipleLines> <false /> </multipleLines>
  1041.         <reservedFamily> 0 </reservedFamily>
  1042.         <titleWidth>0</titleWidth>
  1043.         <icon>0</icon>
  1044.         <textAlign>left</textAlign>
  1045.         <font>Helvetica</font>
  1046.         <textSize>10</textSize>
  1047.         <textStyle>plain</textStyle>
  1048.         <textHeight>13</textHeight>
  1049.         <name>People Index</name>
  1050.         <script>on mouseDownhide meend mouseDown</script>
  1051.     </part>
  1052.     <part>
  1053.         <id>102</id>
  1054.         <type>field</type>
  1055.         <visible> <false /> </visible>
  1056.         <dontWrap> <true /> </dontWrap>
  1057.         <dontSearch> <false /> </dontSearch>
  1058.         <sharedText> <true /> </sharedText>
  1059.         <fixedLineHeight> <true /> </fixedLineHeight>
  1060.         <autoTab> <false /> </autoTab>
  1061.         <lockText> <true /> </lockText>
  1062.         <rect>
  1063.             <left>326</left>
  1064.             <top>248</top>
  1065.             <right>511</right>
  1066.             <bottom>335</bottom>
  1067.         </rect>
  1068.         <style>scrolling</style>
  1069.         <autoSelect> <false /> </autoSelect>
  1070.         <showLines> <false /> </showLines>
  1071.         <wideMargins> <true /> </wideMargins>
  1072.         <multipleLines> <false /> </multipleLines>
  1073.         <reservedFamily> 0 </reservedFamily>
  1074.         <titleWidth>0</titleWidth>
  1075.         <icon>0</icon>
  1076.         <textAlign>left</textAlign>
  1077.         <font>Helvetica</font>
  1078.         <textSize>10</textSize>
  1079.         <textStyle>plain</textStyle>
  1080.         <textHeight>13</textHeight>
  1081.         <name>Mail Index</name>
  1082.         <script>on mouseDownhide meend mouseDown</script>
  1083.     </part>
  1084.     <part>
  1085.         <id>103</id>
  1086.         <type>field</type>
  1087.         <visible> <false /> </visible>
  1088.         <dontWrap> <true /> </dontWrap>
  1089.         <dontSearch> <false /> </dontSearch>
  1090.         <sharedText> <true /> </sharedText>
  1091.         <fixedLineHeight> <true /> </fixedLineHeight>
  1092.         <autoTab> <false /> </autoTab>
  1093.         <lockText> <true /> </lockText>
  1094.         <rect>
  1095.             <left>327</left>
  1096.             <top>146</top>
  1097.             <right>514</right>
  1098.             <bottom>235</bottom>
  1099.         </rect>
  1100.         <style>scrolling</style>
  1101.         <autoSelect> <false /> </autoSelect>
  1102.         <showLines> <false /> </showLines>
  1103.         <wideMargins> <true /> </wideMargins>
  1104.         <multipleLines> <false /> </multipleLines>
  1105.         <reservedFamily> 0 </reservedFamily>
  1106.         <titleWidth>0</titleWidth>
  1107.         <icon>0</icon>
  1108.         <textAlign>left</textAlign>
  1109.         <font>Helvetica</font>
  1110.         <textSize>10</textSize>
  1111.         <textStyle>plain</textStyle>
  1112.         <textHeight>13</textHeight>
  1113.         <name>Business Index</name>
  1114.         <script>on mouseDownhide meend mouseDown</script>
  1115.     </part>
  1116.     <part>
  1117.         <id>111</id>
  1118.         <type>button</type>
  1119.         <visible> <true /> </visible>
  1120.         <reserved5> 0 </reserved5>
  1121.         <reserved4> 0 </reserved4>
  1122.         <reserved3> 0 </reserved3>
  1123.         <reserved2> 0 </reserved2>
  1124.         <reserved1> 0 </reserved1>
  1125.         <enabled> <true /> </enabled>
  1126.         <rect>
  1127.             <left>586</left>
  1128.             <top>142</top>
  1129.             <right>627</right>
  1130.             <bottom>196</bottom>
  1131.         </rect>
  1132.         <style>rectangle</style>
  1133.         <showName> <true /> </showName>
  1134.         <highlight> <false /> </highlight>
  1135.         <autoHighlight> <true /> </autoHighlight>
  1136.         <sharedHighlight> <false /> </sharedHighlight>
  1137.         <family>0</family>
  1138.         <titleWidth>0</titleWidth>
  1139.         <icon>150</icon>
  1140.         <textAlign>center</textAlign>
  1141.         <font>Chicago</font>
  1142.         <textSize>12</textSize>
  1143.         <textStyle>plain</textStyle>
  1144.         <name>Repair</name>
  1145.         <script>on mouseupplay "click"Answer "I will now attempt to make sure your address list is in tip top shape."¬¨&& " I will ask your permission for each task before I do it."¬¨&& " Do you want to continue with this process?" with Cancel or Yesif it is Cancel then exit mouseup------Answer "If you computer crashed while this program was open, some " &¬¨"indexes may be incorrect.  Would you like to rebuild the indexes " &¬¨"from scratch?" with Cancel or No or Yesif it is Cancel then exit mouseupif it is yes then repairStack--------Answer "If you import records from another program or from earlier" && ¬¨"versions of this program, you might have return & tab characters where" && ¬¨"they do not belong.  Correcting this problem may take a LONG time."  && ¬¨"Do you want to do this?" with Cancel or No or Yesif it is yes then removeAllRetTabend mouseupon repairStackpush cardset cursor to watchPicture "PleaseWait",resource,Dialogput "Please Wait..."set the numberformat to 0.--sortIt NamecreateIndexes-- PutCardsIntoRamglobal NewRecordput "False" into NewRecordpop cardsend "SwitchOff"  to bg button "Sort"opencard--if there is a window "PleaseWait" then close window "PleaseWait"put emptyhide "message"play "knock3"end repairStackon sortIt SortTypeLock screenset cursor to watchput "Please Wait...  Sorting"push this cardif SortType = "Mail" then byMailif SortType = "Business" then byBusinessif SortType = "Name" then byNamepop card-- unlock screenend sortIton byMailsort cards of this bg by hilight of bg button "Mail" && bg field "name"end byMailon byBusinesssort cards of this bg by hilight of bg button "Business" && bg field "name"end byBusinesson byNamesort cards of this bg by bg field "name"end bynameon createIndexes-- These variables need to be clean for laterput empty into AllRecordsIndexput empty into MailIndexput empty into BusinessIndexput empty into PeopleIndex-- The next two lines set up the numbers to make indexes for only this bgput the number of the first card of this bg into startNoput the number of the last card of this bg into endNo-- This loop builds the various indexesrepeat with curCard = StartNo to EndNoif bg field "name" of card curCard is emptythen set the name of card curCard to " No Name"else set the name of card curCard to bg field "name" of card curCardput (the short name of card curCard) into CardNameput CardName & return after AllRecordsIndex --*if hilight of bg button "Mail" of card curCard is trueThen put CardName & return after MailIndex --*if hilight of bg button "Business" of card curCard is trueThen put CardName & return after BusinessIndex --*Else put CardName & return after PeopleIndex --*put "Please Wait... Updating Indexes - " && (100 * curCard) / EndNo & "% Complete"set cursor to busyend repeatsort lines of AllRecordsIndexsort lines of MailIndexsort lines of BusinessIndexsort lines of PeopleIndexput AllRecordsIndex into bg field "All Records Index"put MailIndex into bg field "Mail Index"put BusinessIndex into bg field "Business Index"put PeopleIndex into bg field "People Index"end createIndexeson PutCardsIntoRamlock screenshow all cardsunlock screenend PutCardsIntoRamon removeAllRetTabset lockMessages to trueset lockRecent to truepush this cardlock screenset cursor to watchPicture "PleaseWait",resource,Dialogput "Please Wait... Removing Unwanted Characters"put the number of cards of this bg into TotalCardsput the number of bg fields into TotalFieldsset the numberformat to 0.repeat with x = 1 to TotalCardsset cursor to busygo card x of this bgsend exitfield to bg field "Name"send exitfield to bg field "Street"send exitfield to bg field "POBox"send exitfield to bg field "CityState"send exitfield to bg field "Zip"send exitfield to bg field "Phone"put "Please Wait... Removing Unwanted Characters - " && (100 * x)/TotalCards & "%"repeat with FieldNo = 1 to TotalFieldsif bg field FieldNo contains tabthenput "Removing Tabs From: " & short name of bg field FieldNoRemoveTabs (FieldNo)end ifend repeatend repeatpop cardput emptyhide messageif there is a window "PleaseWait" then close window "PleaseWait"end removeAllRetTabon mouseenterFullBalloons showDirect,"Repairs indexes if they become damaged."end mouseenter</script>
  1146.     </part>
  1147.     <part>
  1148.         <id>116</id>
  1149.         <type>field</type>
  1150.         <visible> <false /> </visible>
  1151.         <dontWrap> <false /> </dontWrap>
  1152.         <dontSearch> <false /> </dontSearch>
  1153.         <sharedText> <false /> </sharedText>
  1154.         <fixedLineHeight> <true /> </fixedLineHeight>
  1155.         <autoTab> <false /> </autoTab>
  1156.         <lockText> <true /> </lockText>
  1157.         <rect>
  1158.             <left>65</left>
  1159.             <top>41</top>
  1160.             <right>272</right>
  1161.             <bottom>220</bottom>
  1162.         </rect>
  1163.         <style>rectangle</style>
  1164.         <autoSelect> <false /> </autoSelect>
  1165.         <showLines> <true /> </showLines>
  1166.         <wideMargins> <false /> </wideMargins>
  1167.         <multipleLines> <false /> </multipleLines>
  1168.         <reservedFamily> 0 </reservedFamily>
  1169.         <titleWidth>0</titleWidth>
  1170.         <icon>0</icon>
  1171.         <textAlign>left</textAlign>
  1172.         <font>Times</font>
  1173.         <textSize>14</textSize>
  1174.         <textStyle>plain</textStyle>
  1175.         <textHeight>15</textHeight>
  1176.         <name>‚Ä¢CopyAddress</name>
  1177.         <script>on mouseuphide meend mouseup</script>
  1178.     </part>
  1179.     <part>
  1180.         <id>117</id>
  1181.         <type>button</type>
  1182.         <visible> <true /> </visible>
  1183.         <reserved5> 0 </reserved5>
  1184.         <reserved4> 0 </reserved4>
  1185.         <reserved3> 0 </reserved3>
  1186.         <reserved2> 0 </reserved2>
  1187.         <reserved1> 0 </reserved1>
  1188.         <enabled> <true /> </enabled>
  1189.         <rect>
  1190.             <left>541</left>
  1191.             <top>83</top>
  1192.             <right>582</right>
  1193.             <bottom>137</bottom>
  1194.         </rect>
  1195.         <style>rectangle</style>
  1196.         <showName> <true /> </showName>
  1197.         <highlight> <false /> </highlight>
  1198.         <autoHighlight> <true /> </autoHighlight>
  1199.         <sharedHighlight> <true /> </sharedHighlight>
  1200.         <family>0</family>
  1201.         <titleWidth>0</titleWidth>
  1202.         <icon>3635</icon>
  1203.         <textAlign>center</textAlign>
  1204.         <font>Chicago</font>
  1205.         <textSize>12</textSize>
  1206.         <textStyle>plain</textStyle>
  1207.         <name>Copy</name>
  1208.         <script>on mouseUpset cursor to watchif the commandKey is down then copyaddressInfoelse if the optionKey is down then CopyAddressPhoneelse CopyAddressend mouseUpon CopyAddresslock screenput bg field "Name" & return & ¬¨bg field "Street" & return & bg field "POBox" & return & bg field "CityState" & return & ¬¨bg field "Zip" & return ¬¨into theAddressrepeat with x = number of lines in TheAddress down to 1if line x of TheAddress is empty then delete line x of TheAddressend repeatput theAddress into bg field "‚Ä¢copyaddress"show bg field "‚Ä¢copyaddress"select text of bg field "‚Ä¢copyaddress"domenu "Copy Text"select emptyhide bg field "‚Ä¢copyaddress"end CopyAddressOn CopyAddressPhonelock screenput bg field "Name" & return & ¬¨bg field "Street" & return & bg field "POBox" & return & bg field "CityState" & return & ¬¨bg field "Zip" & return & ¬¨bg field "Phone" & return & bg field "e-mail" ¬¨into theAddressrepeat with x = number of lines in TheAddress down to 1if line x of TheAddress is empty then delete line x of TheAddressend repeatput theAddress into bg field "‚Ä¢copyaddress"show bg field "‚Ä¢copyaddress"select text of bg field "‚Ä¢copyaddress"domenu "Copy Text"select emptyhide bg field "‚Ä¢copyaddress"end CopyAddressPhoneon copyaddressInfoput "All Records Index" into indexType -- only a local variable this timeget ListDialog(1,IndexType &" / Type Name or Select:",bg field IndexType,false,,,)if it is cancel then exit copyaddressInfoset cursor to watchdelete item 1 of itput it into CardNamelock screenput bg field "street" of card CardName of this bg into bg field "street"put bg field "POBox" of card CardName of this bg into bg field "POBox"put bg field "citystate" of card CardName of this bg into bg field "citystate"put bg field "zip" of card CardName of this bg into bg field "zip"put bg field "phone" of card CardName of this bg into bg field "phone"put bg field "e-mail" of card CardName of this bg into bg field "e-mail"send "addressMe" to bg field "‚Ä¢AddressSummary"end copyaddressInfoon mouseenterFullBalloons showDirect,"‚Ä¢ Copies full address to the Clipboard." & return &¬¨"‚Ä¢ Holding down the option key also copies all the phone numbers & e-mail addresses." & return &¬¨¬¨"‚Ä¢ Holding down the COMMAND key will let you copy address, phone, & e-mail information from another" && ¬¨"record."end mouseenter</script>
  1209.     </part>
  1210.     <part>
  1211.         <id>118</id>
  1212.         <type>button</type>
  1213.         <visible> <true /> </visible>
  1214.         <reserved5> 0 </reserved5>
  1215.         <reserved4> 0 </reserved4>
  1216.         <reserved3> 0 </reserved3>
  1217.         <reserved2> 0 </reserved2>
  1218.         <reserved1> 0 </reserved1>
  1219.         <enabled> <true /> </enabled>
  1220.         <rect>
  1221.             <left>586</left>
  1222.             <top>83</top>
  1223.             <right>627</right>
  1224.             <bottom>137</bottom>
  1225.         </rect>
  1226.         <style>rectangle</style>
  1227.         <showName> <true /> </showName>
  1228.         <highlight> <false /> </highlight>
  1229.         <autoHighlight> <true /> </autoHighlight>
  1230.         <sharedHighlight> <true /> </sharedHighlight>
  1231.         <family>0</family>
  1232.         <titleWidth>0</titleWidth>
  1233.         <icon>148</icon>
  1234.         <textAlign>center</textAlign>
  1235.         <font>Chicago</font>
  1236.         <textSize>12</textSize>
  1237.         <textStyle>plain</textStyle>
  1238.         <name>File</name>
  1239.         <script>on mouseupplay clicklock messageslock recentanswer "Do you want to IMPORT or EXPORT records?"¬¨& return & return & "(Hold down the option key when clicking export if you want to select certain fields to export.)" ¬¨with "Cancel" or "Import" or "Export"play clickif it is Cancel then exit mouseupelse if it is import then ChooseFileelse exportrecordsend mouseupon exportRecords-- outFile = name and location of file to be saved-- outFileText = temporary storage for chunks of the outfile contents-- ExportFields = list of fields to be included in the export-- TheBackground = name of the background to be exported-- ItemDivider = one char string that acts as a seperator between items-- RecordDivider = one char string that acts as a seperator between verses-- SoftReturn = soft return character to take care of returns---- set cantAbort of this stack to trueset cursor to watchset lockMessages to trueset lockRecent to true--if the optionkey is down then put Choosefields(True) into ExportFields -- SELECTS FIELDS FOR EXPORTelse put Choosefields(False) into ExportFields -- DOES NOT ASK THE USERif ExportFields is empty then exit exportRecordsask file "Name the file for the exported records..." with "Exported Records" && the dateif it is empty then exit exportRecordselse put it into outFileput SelectRecords() into WhichRecordsif WhichRecords is empty then exit exportRecordsset cursor to watchPicture "PleaseWait",resource,Dialogput "Records" into TheBackgroundput tab into ItemDividerput return into RecordDividerput numToChar (10) into SoftReturn--put "Saving information as" && outFileput "Address Book 2.0 File" & tab & WhichRecords & return into outFileText -- PUTS A HEADER LINE B4 outFileTextopen file outFilewrite outFileText to file outFile--push cardlock screengo bg theBackgroundput empty into outFileTextrepeat with p = 1 to the number of items in ExportFieldsput item p of exportfields after outFileTextput ItemDivider after outFileTextend repeat--put "Mail" after outFileTextput ItemDivider after outFileTextput "Business" after outFileText--put RecordDivider after outFileTextwrite outFileText to file outFilerepeat with x = 1 to the number of marked cardsset cursor to busyput "Writing record" && x &&"out of" && the number of marked cardsput empty into outFileTextrepeat with y = 1 to the number of items in ExportFieldsput item Y of ExportFields into ThisFieldput bg field ThisField of marked card x into CurrentTextput CleanUpText (CurrentText) into CurrentText -- kills tabs and returnsput CurrentText after outFileTextput ItemDivider after outFileTextend repeat -- end y repeat---- ADD BUSINESS AND MAIL INFOput the hilight of bg button "mail" after outFileTextput ItemDivider after outFileTextput the hilight of bg button "business" after outFileText----put RecordDivider after outFileTextwrite outFileText to file outFileend repeat  -- end x repeatclose file outFilepop cardhide messageset cantAbort of this stack to falseif there is a window "PleaseWait" then close window "PleaseWait"play "crystal2"end exportRecordsfunction CleanUpText TheTextput return into BadReturnput tab into BadTabput numToChar (10) into GoodReturn -- LR Line Feedput numToChar (26) into GoodTab -- SUB Substituterepeat -- REMOVES ANY SCREWY ALREADY PRESENT LINEFEEDSget offset (GoodReturn,TheText)if it is not 0 then put " " into char it of TheTextelse exit repeatend repeatrepeat -- REMOVES ANY SCREWY ALREADY PRESENT SUBSTITUTESget offset (GoodTab,TheText)if it is not 0 then put " " into char it of TheTextelse exit repeatend repeatrepeat -- CHANGES TABS TO SUB'Sget offset (BadTab,TheText)if it is not 0 then put GoodTab into char it of TheTextelse exit repeatend repeatrepeat -- CHANGES RETURNS TO LF'Sget offset (BadReturn,TheText)if it is not 0 then put GoodReturn into char it of TheTextelse exit repeatend repeatreturn TheTextend CleanUpTextfunction ChooseFields Choice -- SELECTS FIELDS FOR EXPORT  CHOICE = TRUE GIVES USER SELECTIONpush cardgo bg recordsput 0 into yget itemDelimiterput it into OlditemDelimiterset itemDelimiter to ","repeat with x = 1 to the number of bg fieldsset cursor to busyif (the sharedtext of bg field x is true) OR ¬¨(char 1 of the short name of bg field x = "‚Ä¢") OR ¬¨(the short name of bg field x = "name") OR ¬¨(the short name of bg field x = "gifts") then next repeat--add 1 to yput the short name of bg field x into line y of ExportFieldsChoiceput the short name of bg field x into item y of ExportFieldsput y into item y of ExportSelectionsend repeatpop cardif Choice is True thenput empty into ExportFieldsput "Choose fields to export (Shift-Click to Select):" into thePromptget listdialog(ExportSelections,"Choose fields to export (Shift-Click to Select):",ExportFieldsChoice,True)if it is empty then put empty into ExportFieldselseput it into theanswerrepeat with z = 1 to the number of lines in theanswerput item 2 of line z of theanswer into item z of ExportFieldsend repeatend ifend ifif ExportFields is not empty then put "Name" & "," before ExportFieldsset itemDelimiter to olditemDelimiterreturn ExportFieldsend chooseFieldsfunction SelectRecords-- THIS ALLOWS THE USER TO CHOOSE WHICH RECORDS TO INCLUDE ---unmark all cardsput "All Records" & return into TheListput "Business Records" & return after TheListPut "Just This Record" & return after TheListPut "Marked to Mail" & return after TheListPut "People Records" & return after TheListget ListDialog(1,"Which records do you want to include?",TheList)if it is not empty thendelete item 1 of itput it into TheRecordsPicture "PleaseWait",resource,Dialogput "Please Wait... Marking Records..."if TheRecords = "All Records"then mark cards where bg field "name" is in bg field "All Records Index"if TheRecords = "Business Records"then mark cards where bg field "name" is in bg field "Business Index"if TheRecords = "Just This Record"then mark this cardif TheRecords = "Marked to Mail"then mark cards where bg field "name" is in bg field "Mail Index"if TheRecords = "People Records"then mark cards where bg field "name" is in bg field "People Index"end ifif the number of marked cards = 0thenplay "knock3"Answer "There are no records that match your selection."put empty into TheRecordsend ifput emptyhide messageif there is a window "PleaseWait" then close window "PleaseWait"return TheRecordsend SelectRecordsfunction ConvertBack TheTextput return into GoodReturnput tab into GoodTabput numToChar (10) into BadReturn -- LR Line Feedput numToChar (26) into BadTab -- SUB Substitute--repeat -- REMOVES ANY SCREWY ALREADY PRESENT RETURNSget offset (GoodReturn,TheText)if it is not 0 then put empty into char it of TheTextelse exit repeatend repeatrepeat -- REMOVES ANY SCREWY ALREADY PRESENT TABSget offset (GoodTab,TheText)if it is not 0 then put empty into char it of TheTextelse exit repeatend repeatrepeat -- CHANGES SUB'S TO TABSget offset (BadTab,TheText)if it is not 0 then put GoodTab into char it of TheTextelse exit repeatend repeatrepeat -- CHANGES LF'S TO RETURNSget offset (BadReturn,TheText)if it is not 0 then put GoodReturn into char it of TheTextelse exit repeatend repeatreturn TheTextend ConvertBackon ChooseFile inFile-- infile = name and location of file to be imported-- InFileText = temporary storage for chunks of the outfile contents-- ImportFields = list of fields to be included in the import-- TheBackground = name of the background to be imported into-- ItemDivider = one char string that acts as a seperator between items-- RecordDivider = one char string that acts as a seperator between verses-- set cantAbort of this stack to trueset cursor to watchset lockMessages to trueset lockRecent to true--put tab into ItemDividerput return into RecordDividerset itemDelimiter to ItemDivider-- Select the Text File to Import ----------answer file "Select a Cool Address Book or ASCII file:" of type "TEXT"if it is empty then exit to hypercardput it into inFilerepeat -- Closes the file if needed and reopens it.open file infileif the result is not empty thenanswer the resultclose file infileelse exit repeatend repeatset cursor to watchread from file infile until RecordDividerput item 1 of it into fileTypeif fileType =  "Address Book 2.0 File" then ImportRecords inFileelse if fileType =  "COOL ADDRESS BOOK FILE" & return thenclose file infileImportCoolText infileelseclose file infileplay knock3Answer "This is not a Cool Address Book file.  I will now attempt an ASCII import.  This import will work better" &&¬¨"if the first record in the ASCII file consists of labels of each of the items.  This makes it easier for you to match" && ¬¨"up information" with Cancel or "Import ASCII"if it is Cancel then exit ChooseFilePut "Importing ASCII File?...."ImportASCII infileend ifclose file infilehide messageend ChooseFilefunction CountRecords Infile-- must be passed with the pointer to the first record-- thrid line of text must be the first recordPicture "PleaseWait",resource,Dialogput 0 into xput return into RecordDividerrepeatread from file infile until RecordDividerif it is empty then exit repeatelse add 1 to xput "Please Wait... Counting Records: " && xend repeatclose file infileopen file infileread from file infile until RecordDividerread from file infile until RecordDividerif there is a window "PleaseWait" then close window "PleaseWait"return xend CountRecordsfunction ThePercent z,NumberToImportSET NUMBERFORMAT TO 0put (z*100)/NumberToImport into TheAnswerPut "(" & theAnswer & "%)" into TheAnswerreturn TheAnswerend thePercenton ImportRecords inFile-- infile = name and location of file to be imported-- InFileText = temporary storage for chunks of the outfile contents-- ImportFields = list of fields to be included in the import-- TheBackground = name of the background to be imported into-- ItemDivider = one char string that acts as a seperator between items-- RecordDivider = one char string that acts as a seperator between verse-- CurrentData = data being imported into a single field or button-- fieldName = current field being stuffed-- NumberToImport = total number of fields to import-- set cantAbort of this stack to trueset cursor to watchset lockMessages to trueset lockRecent to true--put "Records" into TheBackgroundput tab into ItemDividerput return into RecordDividerset itemDelimiter to ItemDivider--read from file infile until RecordDividerput it into ImportFields---- put CountRecords(infile) into NumberToImportpush card--Picture "PleaseWait",resource,Dialoglock screenput 0 into zput empty into LastModInfoif "LastModified" is in ImportFields then -- if not LastModified info then new information imported by defaultrepeat with y = 1 to the number of items in ImportFieldsif item y of importFields = "LastModified" thenput Y into LastModiNumberput "dafd" into LastModInfoexit repeatend ifend repeatend iflock messageslock recentput the number of items in ImportFields into IMPORTFIELDNUMBERrepeatadd 1 to zread from file infile until RecordDividerif it is not empty thenput it into InFileTextif LastModInfo is not empty then put ConvertBack(item LastModiNumber of infileText) into LastModInfo -- last modifed informationrepeat with x = 1 to IMPORTFIELDNUMBERput ConvertBack(item x of infileText) into CurrentDataput item x of ImportFields into FieldNameif last character OF FieldName is return then delete last character of Fieldnameif FieldName = "Name"thenif there is not a card CurrentData of bg theBackgroundthensend "domenu new card" to hypercardput currentData into bg field "name"-- Put "Please Wait... IMPORTING" && z  & ":" && CurrentDataPut "Please Wait... IMPORTING:" && CurrentDataelseif line 2 of LastModInfo ‚⧠line 2 of bg field "LastModified" of card CurrentData of bg theBackground thenPut "Please Wait... SKIPPING" && z  & ":" && CurrentDataexit repeat -- record is older than one in stackelsego card CurrentData of bg theBackgroundPut "Please Wait... UPDATING" && z  & ":" && CurrentDataend ifend ifelse if FieldName = "Mail" thenset the hilight of bg button "mail" to CurrentDataelse if FieldName = "Business" thenset the hilight of bg button "Business" to CurrentDataelse put CurrentData into bg field FieldNameif x = IMPORTFIELDNUMBER -- updates the card info on last time throughthenset the name of this card to bg field "Name"send "addressMe" to bg field "‚Ä¢addresssummary"if LastModInfo is not empty then put LastModInfo into bg field "LastModified"end ifend repeatelse exit repeatend repeatsend "repairStack" to bg button "Repair"if there is a window "PleaseWait" then close window "PleaseWait"-- updateSortpop cardopencardunlock screenplay "crystal2"SET CURSOR TO ARROWend ImportRecords-------------------------------------------------------------------------------------------on ImportCoolText inFile -- FOR OLDER VERSIONS OF THE PROGRAM------------------------------------------------------------------------------------------- USES LOCAL VARIABLES:-- Infile = path to the TEXT file to be used-- Countfields = Number of fields in the imported TEXT file-- FieldList = Names of bg fields in the order they will be used-- InFileText = Total contents of inFile-- ItemNo = Number of items being examined or transfered from inFileText-- recordNo = the number of the currently imported record---------------------------------------------------------------------------------------------------------------------------------------- READS ENTIRE TEXT INTO VARIALBE inFileText AND SETS IT UP-------------------------------------------------------------------beepanswer "This is a text file from an older version of this program.  It will now be imported."¬¨& return & return & "Note: This kind of import works best if the address book is empty."set cursor to watchopen file inFileread from file inFile until endclose file inFileput it into inFileTextdelete first line of inFileText -- DELETES THE FILE TYPE INFORMATIONlock screenpush card--------------------------------------------------------------------- PUTS THE INFORMATION INTO THE APPROPRIATE CARD FIELDS-------------------------------------------------------------------set the itemDelimiter to tab -- NEEDED TO PROPERLY READ FROM inFileTextput 0 into itemNoput 0 into RecordNorepeat --WILL JUMP OUT OF REPEAT LOOP AT THE END OF THE FIELDadd 1 to recordNoadd 1 to ItemNoput item ItemNo of inFileText into RoughNameif the length of RoughName > 33 then put char 1 to 33 of RoughName into RoughNameput Checkcommas(RoughName) into RoughNameif there is a card RoughName of this bg thenput "Record Exists - skipping record" && recordNo && "--" && roughnameadd 13 to ItemNonext repeatend ifsend "AddNewCard" to bg button "new"send "dateit" to bg field "dateCreated"set cursor to busyput "Importing record" && recordNo && "--" && item (itemNo ) of inFileTextput item ItemNo of inFileText into bg field "name"add 1 to ItemNoput item ItemNo of inFileText into bg field "POBox"add 1 to ItemNoput item ItemNo of inFileText into bg field "Street"add 1 to ItemNoput item ItemNo of inFileText into bg field "CityState"add 1 to ItemNoput item ItemNo of inFileText into bg field "ZIP"add 1 to ItemNoput item ItemNo of inFileText into bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into line 2 of bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into line 3 of bg field "phone"add 1 to ItemNoput item ItemNo of inFileText into line 4 of bg field "phone"add 1 to ItemNosend closefield to bg field "phone"put item ItemNo of inFileText into bg field "special dates"add 1 to ItemNoput item ItemNo of inFileText into bg field "notes"-- set the name of this card to bg field "Name"--------------------------------------------------------------------- SETS THE BG BUTTONS TO APPROPRIATE SETTINGS-------------------------------------------------------------------add 2 to ItemNoif item itemNo of inFileText = "false"then set hilight of bg button "business" to falseelse set hilight of bg button "business" to trueadd 1 to ItemNoif item itemNo of inFileText = "false"then set hilight of bg button "Mail" to falseelse set hilight of bg button "Mail" to truesend closefield to bg field "name"if ItemNO ‚â• the number of items in inFileText then exit repeatend repeatpop cardhide messagesend RepairStack to bg button "repair"play "crystal2"end ImportCoolText--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------on mouseenterFullBalloons showDirect,"Click me to import or export information (ASCII Text format)."end mouseenteron ImportASCII inFile-- infile = name and location of file to be imported (should be closed-- InFileText = temporary storage for chunks of the outfile contents-- ImportFields = list of fields to be included in the import in order-- TheBackground = name of the background to be imported into-- ItemDivider = one char string that acts as a seperator between items-- RecordDivider = one char string that acts as a seperator between verse-- CurrentData = data being imported into a single field or button-- fieldName = current field being stuffed-- NumberToImport = total number of fields to import-- PossibleFields = all the fields that can be imported to---- set cantAbort of this stack to trueput ListFields() into PossibleFieldsset cursor to watchset lockMessages to trueset lockRecent to true--put "Records" into TheBackgroundput tab into ItemDividerput return into RecordDividerset itemDelimiter to ItemDivider--open file infileread from file infile until RecordDividerput it into TheLineOfInfoclose file infileput PossibleFields into PossibleFieldsTEMPrepeat with x = 1 to the number of items in TheLineOfInfoput item x of TheLineOfInfo into TheInfoget listdialog(1,"Choose field to import this item into: " & TheInfo,PossibleFieldsTEMP,false)if it = cancel then exit ImportASCIIput it into TheResponseset itemDelimiter to ","put item 1 of theResponse into TheNumput item 2 of TheResponse into TheResponseput TheResponse into line x of ImportFieldOrderif TheResponse is not in "phone,e-mail,special dates,notes,DON'T IMPORT THIS ITEM" thendelete line TheNum of PossibleFieldsTEMPend ifset itemDelimiter to tabend repeatif "name" is not in ImportFieldorderthenPlay "knock3"Answer "You must assign a field to the NAME field in order to import" with Cancelexit ImportASCIIend ifPicture "PleaseWait",resource,Dialoglock screenrepeat with x = 1 to the number of lines in ImportFieldOrderif line x of ImportFieldOrder = "name" thenput x into NameNumberexit repeatend ifend repeatopen file infilerepeatread from file infile until RecordDividerput it into InFileTextif it is empty then exit repeatput item NameNumber of InFileText into RecordNameif there is a card REcordName of this bg thenanswer RecordName & return & "This record already exists - SKIPPING."next repeatend ifsend "domenu new card" to hypercardput "Please wait... Importing:" && RecordNamerepeat with x = 1 to the number of items in InFileTextput line x of ImportFieldOrder into FieldNameIf FieldName = "DON'T IMPORT THIS ITEM" then next repeatput item x of InFileText into TheInfoif bg field FieldName is empty then put TheINfo into bg field FieldNameelse  put return & TheINfo after bg field fieldNameend repeatrepeat with x = 1 to ((the number of lines in ImportFieldOrder) - 1)-- send closefield to bg field "name"send closefield to bg field (line x of ImportFieldOrder)end repeatend repeatclose file INfilesend "repairStack" to bg button "Repair"if there is a window "PleaseWait" then close window "PleaseWait"send opencard to this cardplay "crystal2"end ImportASCIIfunction ListFields -- returns all possible fields for putting stuff intopush cardgo bg recordsput 0 into yget itemDelimiterput it into OlditemDelimiterset itemDelimiter to tabrepeat with x = 1 to the number of bg fieldsset cursor to busyif (the sharedtext of bg field x is true) OR ¬¨(char 1 of the short name of bg field x = "‚Ä¢") OR ¬¨(the short name of bg field x = "name") OR ¬¨(the short name of bg field x = "gifts") OR ¬¨(the short name of bg field x = "dateCreated") OR ¬¨(the short name of bg field x = "LastModified") then next repeat--add 1 to yput the short name of bg field x into line y of ExportFieldsChoiceput the short name of bg field x into item y of ExportFieldsput y into item y of ExportSelectionsend repeatpop cardif Choice is True thenput empty into ExportFieldsput "Choose fields to export (Shift-Click to Select):" into thePromptget listdialog(ExportSelections,"Choose fields to export (Shift-Click to Select):",ExportFieldsChoice,True)if it is empty then put empty into ExportFieldselseput it into theanswerrepeat with z = 1 to the number of lines in theanswerput item 2 of line z of theanswer into item z of ExportFieldsend repeatend ifend ifadd 1 to yPut "DON'T IMPORT THIS ITEM" INTO LINE Y OF ExportFieldsChoiceif ExportFieldsChoice is not empty then put "Name" & return before ExportFieldsChoiceset itemDelimiter to olditemDelimiterreturn ExportFieldsChoiceend ListFields</script>
  1240.     </part>
  1241.     <part>
  1242.         <id>119</id>
  1243.         <type>field</type>
  1244.         <visible> <true /> </visible>
  1245.         <dontWrap> <true /> </dontWrap>
  1246.         <dontSearch> <false /> </dontSearch>
  1247.         <sharedText> <true /> </sharedText>
  1248.         <fixedLineHeight> <true /> </fixedLineHeight>
  1249.         <autoTab> <false /> </autoTab>
  1250.         <lockText> <true /> </lockText>
  1251.         <rect>
  1252.             <left>315</left>
  1253.             <top>111</top>
  1254.             <right>367</right>
  1255.             <bottom>129</bottom>
  1256.         </rect>
  1257.         <style>transparent</style>
  1258.         <autoSelect> <false /> </autoSelect>
  1259.         <showLines> <false /> </showLines>
  1260.         <wideMargins> <false /> </wideMargins>
  1261.         <multipleLines> <false /> </multipleLines>
  1262.         <reservedFamily> 0 </reservedFamily>
  1263.         <titleWidth>0</titleWidth>
  1264.         <icon>0</icon>
  1265.         <textAlign>left</textAlign>
  1266.         <font>Times</font>
  1267.         <textSize>14</textSize>
  1268.         <textStyle>bold</textStyle>
  1269.         <textHeight>15</textHeight>
  1270.         <name>‚Ä¢label</name>
  1271.         <script>-- on mouseup-- lock messages-- lock recent-- repeat with x = 1 to the number of cards in this bg-- -- go to card x of this bg-- put x-- if the number of items in bg field "name" of card x of this bg < 2-- then-- play "click"-- answer bg field "name" of card x of this bg-- end if-- end repeat-- -- put "," after first word of bg field name-- -- send closefield to bg field name-- -- go next card of this bg-- end mouseup-- on Switch-- beep 2-- put bg field "Street" into MailStuff-- put bg field "POBox" into bg field "Street"-- put MailStuff into bg field "POBox"-- wait 2 second-- end switch-- on ClearOne-- beep-- put empty into bg field "POBox"-- wait 1 second-- end ClearOne-- on mouseup-- if the optionkey is down-- then-- play click-- ask "Number"-- put it into startNo-- lock screen-- repeat with x = startNo to the number of cards in this bg-- put x-- go card x of this bg-- if bg field "Street" is empty AND bg field "POBox" is empty then next repeat-- else unlock screen-- if bg field "Street" contains "Box" then Switch-- if bg field "POBox" is not empty AND "box" is not in bg field "POBox" then switch-- if bg field "Street" = bg field "POBox" then ClearOne-- lock screen-- end repeat-- end if-- if the shiftKey is down then switch-- end mouseup</script>
  1272.     </part>
  1273.     <part>
  1274.         <id>120</id>
  1275.         <type>field</type>
  1276.         <visible> <true /> </visible>
  1277.         <dontWrap> <false /> </dontWrap>
  1278.         <dontSearch> <true /> </dontSearch>
  1279.         <sharedText> <false /> </sharedText>
  1280.         <fixedLineHeight> <false /> </fixedLineHeight>
  1281.         <autoTab> <false /> </autoTab>
  1282.         <lockText> <true /> </lockText>
  1283.         <rect>
  1284.             <left>314</left>
  1285.             <top>42</top>
  1286.             <right>524</right>
  1287.             <bottom>106</bottom>
  1288.         </rect>
  1289.         <style>transparent</style>
  1290.         <autoSelect> <false /> </autoSelect>
  1291.         <showLines> <false /> </showLines>
  1292.         <wideMargins> <false /> </wideMargins>
  1293.         <multipleLines> <false /> </multipleLines>
  1294.         <reservedFamily> 0 </reservedFamily>
  1295.         <titleWidth>0</titleWidth>
  1296.         <icon>0</icon>
  1297.         <textAlign>left</textAlign>
  1298.         <font>Times</font>
  1299.         <textSize>12</textSize>
  1300.         <textStyle>bold</textStyle>
  1301.         <textHeight>16</textHeight>
  1302.         <name>‚Ä¢AddressSummary</name>
  1303.         <script>on mouseup-- play "click"put empty into meput MailingAddress() into me-- if the optionkey is down then getallend mouseupon addressMeput MailingAddress() into mesend dateit to bg field "lastmodified"end addressMe-- on getall-- LOCK MESSAGES-- put number of cards in this bg into Total-- repeat with x = 1 to Total-- go card x of bg records-- put mailingaddress() into bg field "‚Ä¢addresssummary"-- put x && "of" && Total-- end repeat-- end getallfunction mailingAddressget itemDelimiterput it into ResetDelimiterset itemDelimiter to ","put bg field "name" into tempstorageput item 1 of tempstorage into TempAgaindelete item 1 of tempstorageput " " & tempAgain after tempstorageput tempstorage & return into FinalAddressif bg field "POBox" is empty then put bg field "street" & return after FinalAddresselse put bg field "POBox" & return after FinalAddressput bg field "citystate" && bg field "zip" after FinalAddressset itemDelimiter to ResetDelimiterif char 1 of FinalAddress = " " then delete char 1 of FinalAddressReturn FinalAddressend mailingAddresson mouseenterFullBalloons showDirect,"This is a preview of the mailing address that would be printed on an envelope."end mouseenter</script>
  1304.     </part>
  1305.     <part>
  1306.         <id>124</id>
  1307.         <type>field</type>
  1308.         <visible> <true /> </visible>
  1309.         <dontWrap> <true /> </dontWrap>
  1310.         <dontSearch> <false /> </dontSearch>
  1311.         <sharedText> <false /> </sharedText>
  1312.         <fixedLineHeight> <false /> </fixedLineHeight>
  1313.         <autoTab> <false /> </autoTab>
  1314.         <lockText> <true /> </lockText>
  1315.         <rect>
  1316.             <left>409</left>
  1317.             <top>372</top>
  1318.             <right>531</right>
  1319.             <bottom>385</bottom>
  1320.         </rect>
  1321.         <style>transparent</style>
  1322.         <autoSelect> <false /> </autoSelect>
  1323.         <showLines> <false /> </showLines>
  1324.         <wideMargins> <false /> </wideMargins>
  1325.         <multipleLines> <false /> </multipleLines>
  1326.         <reservedFamily> 0 </reservedFamily>
  1327.         <titleWidth>0</titleWidth>
  1328.         <icon>0</icon>
  1329.         <textAlign>right</textAlign>
  1330.         <font>Times</font>
  1331.         <textSize>12</textSize>
  1332.         <textStyle>bold</textStyle>
  1333.         <textHeight>16</textHeight>
  1334.         <name>DateCreated</name>
  1335.         <script>on dateitput the short date && the short time into meput the secs into line 2 of mesend dateit to bg field "lastmodified"end dateiton mouseenterFullBalloons showDirect,"Shows the date this records was created."end mouseenter</script>
  1336.     </part>
  1337.     <part>
  1338.         <id>125</id>
  1339.         <type>field</type>
  1340.         <visible> <true /> </visible>
  1341.         <dontWrap> <true /> </dontWrap>
  1342.         <dontSearch> <false /> </dontSearch>
  1343.         <sharedText> <false /> </sharedText>
  1344.         <fixedLineHeight> <false /> </fixedLineHeight>
  1345.         <autoTab> <false /> </autoTab>
  1346.         <lockText> <true /> </lockText>
  1347.         <rect>
  1348.             <left>408</left>
  1349.             <top>383</top>
  1350.             <right>531</right>
  1351.             <bottom>396</bottom>
  1352.         </rect>
  1353.         <style>transparent</style>
  1354.         <autoSelect> <false /> </autoSelect>
  1355.         <showLines> <false /> </showLines>
  1356.         <wideMargins> <false /> </wideMargins>
  1357.         <multipleLines> <false /> </multipleLines>
  1358.         <reservedFamily> 0 </reservedFamily>
  1359.         <titleWidth>0</titleWidth>
  1360.         <icon>0</icon>
  1361.         <textAlign>right</textAlign>
  1362.         <font>Times</font>
  1363.         <textSize>12</textSize>
  1364.         <textStyle>bold</textStyle>
  1365.         <textHeight>16</textHeight>
  1366.         <name>LastModified</name>
  1367.         <script>-- on mouseup-- dateit-- end mouseupon dateitput empty into meput the short date && the short time into meput the secs into line 2 of meend dateiton mouseenterFullBalloons showDirect,"Shows the date this records was last modified."end mouseenter</script>
  1368.     </part>
  1369.     <part>
  1370.         <id>126</id>
  1371.         <type>field</type>
  1372.         <visible> <true /> </visible>
  1373.         <dontWrap> <true /> </dontWrap>
  1374.         <dontSearch> <false /> </dontSearch>
  1375.         <sharedText> <true /> </sharedText>
  1376.         <fixedLineHeight> <false /> </fixedLineHeight>
  1377.         <autoTab> <false /> </autoTab>
  1378.         <lockText> <true /> </lockText>
  1379.         <rect>
  1380.             <left>316</left>
  1381.             <top>372</top>
  1382.             <right>409</right>
  1383.             <bottom>396</bottom>
  1384.         </rect>
  1385.         <style>transparent</style>
  1386.         <autoSelect> <false /> </autoSelect>
  1387.         <showLines> <false /> </showLines>
  1388.         <wideMargins> <false /> </wideMargins>
  1389.         <multipleLines> <false /> </multipleLines>
  1390.         <reservedFamily> 0 </reservedFamily>
  1391.         <titleWidth>0</titleWidth>
  1392.         <icon>0</icon>
  1393.         <textAlign>right</textAlign>
  1394.         <font>Times</font>
  1395.         <textSize>12</textSize>
  1396.         <textStyle>bold</textStyle>
  1397.         <textHeight>16</textHeight>
  1398.         <name>‚Ä¢label</name>
  1399.         <script></script>
  1400.     </part>
  1401.     <part>
  1402.         <id>129</id>
  1403.         <type>field</type>
  1404.         <visible> <true /> </visible>
  1405.         <dontWrap> <true /> </dontWrap>
  1406.         <dontSearch> <false /> </dontSearch>
  1407.         <sharedText> <true /> </sharedText>
  1408.         <fixedLineHeight> <true /> </fixedLineHeight>
  1409.         <autoTab> <false /> </autoTab>
  1410.         <lockText> <true /> </lockText>
  1411.         <rect>
  1412.             <left>1</left>
  1413.             <top>298</top>
  1414.             <right>80</right>
  1415.             <bottom>318</bottom>
  1416.         </rect>
  1417.         <style>transparent</style>
  1418.         <autoSelect> <false /> </autoSelect>
  1419.         <showLines> <false /> </showLines>
  1420.         <wideMargins> <false /> </wideMargins>
  1421.         <multipleLines> <false /> </multipleLines>
  1422.         <reservedFamily> 0 </reservedFamily>
  1423.         <titleWidth>0</titleWidth>
  1424.         <icon>0</icon>
  1425.         <textAlign>right</textAlign>
  1426.         <font>Times</font>
  1427.         <textSize>14</textSize>
  1428.         <textStyle>bold</textStyle>
  1429.         <textHeight>19</textHeight>
  1430.         <name>‚Ä¢Label</name>
  1431.         <script></script>
  1432.     </part>
  1433.     <part>
  1434.         <id>130</id>
  1435.         <type>field</type>
  1436.         <visible> <true /> </visible>
  1437.         <dontWrap> <true /> </dontWrap>
  1438.         <dontSearch> <false /> </dontSearch>
  1439.         <sharedText> <true /> </sharedText>
  1440.         <fixedLineHeight> <true /> </fixedLineHeight>
  1441.         <autoTab> <false /> </autoTab>
  1442.         <lockText> <true /> </lockText>
  1443.         <rect>
  1444.             <left>1</left>
  1445.             <top>158</top>
  1446.             <right>80</right>
  1447.             <bottom>178</bottom>
  1448.         </rect>
  1449.         <style>transparent</style>
  1450.         <autoSelect> <false /> </autoSelect>
  1451.         <showLines> <false /> </showLines>
  1452.         <wideMargins> <false /> </wideMargins>
  1453.         <multipleLines> <false /> </multipleLines>
  1454.         <reservedFamily> 0 </reservedFamily>
  1455.         <titleWidth>0</titleWidth>
  1456.         <icon>0</icon>
  1457.         <textAlign>right</textAlign>
  1458.         <font>Times</font>
  1459.         <textSize>14</textSize>
  1460.         <textStyle>bold</textStyle>
  1461.         <textHeight>19</textHeight>
  1462.         <name>‚Ä¢Label</name>
  1463.         <script></script>
  1464.     </part>
  1465.     <part>
  1466.         <id>98</id>
  1467.         <type>field</type>
  1468.         <visible> <false /> </visible>
  1469.         <dontWrap> <true /> </dontWrap>
  1470.         <dontSearch> <true /> </dontSearch>
  1471.         <sharedText> <false /> </sharedText>
  1472.         <fixedLineHeight> <false /> </fixedLineHeight>
  1473.         <autoTab> <false /> </autoTab>
  1474.         <lockText> <true /> </lockText>
  1475.         <rect>
  1476.             <left>0</left>
  1477.             <top>107</top>
  1478.             <right>539</right>
  1479.             <bottom>400</bottom>
  1480.         </rect>
  1481.         <style>scrolling</style>
  1482.         <autoSelect> <false /> </autoSelect>
  1483.         <showLines> <false /> </showLines>
  1484.         <wideMargins> <false /> </wideMargins>
  1485.         <multipleLines> <false /> </multipleLines>
  1486.         <reservedFamily> 0 </reservedFamily>
  1487.         <titleWidth>0</titleWidth>
  1488.         <icon>0</icon>
  1489.         <textAlign>left</textAlign>
  1490.         <font>Courier</font>
  1491.         <textSize>12</textSize>
  1492.         <textStyle>plain</textStyle>
  1493.         <textHeight>16</textHeight>
  1494.         <name>Gifts</name>
  1495.         <script>on mouseuphide meend mouseup</script>
  1496.     </part>
  1497.     <content>
  1498.         <layer>background</layer>
  1499.         <id>17</id>
  1500.         <text><span class="style10">ame</span><span class="style17">(Last,First):</span><span class="style11"></span><span class="style10">Street:PO Box:City,State:Zip:</span><span class="style31"></span><span class="style10">E-Mail:SpecialDates:</span></text>
  1501.     </content>
  1502.     <content>
  1503.         <layer>background</layer>
  1504.         <id>78</id>
  1505.         <text>All Records Index</text>
  1506.     </content>
  1507.     <content>
  1508.         <layer>background</layer>
  1509.         <id>89</id>
  1510.         <text>Address Book Records</text>
  1511.     </content>
  1512.     <content>
  1513.         <layer>background</layer>
  1514.         <id>63</id>
  1515.         <text>Put your return address here.</text>
  1516.     </content>
  1517.     <content>
  1518.         <layer>background</layer>
  1519.         <id>119</id>
  1520.         <text><span class="style12">otes:</span></text>
  1521.     </content>
  1522.     <content>
  1523.         <layer>background</layer>
  1524.         <id>120</id>
  1525.         <text> Anonymous</text>
  1526.     </content>
  1527.     <content>
  1528.         <layer>background</layer>
  1529.         <id>121</id>
  1530.         <text>Mailing Address Preview:</text>
  1531.     </content>
  1532.     <content>
  1533.         <layer>background</layer>
  1534.         <id>126</id>
  1535.         <text>Date Created:Last Modified:</text>
  1536.     </content>
  1537.     <content>
  1538.         <layer>background</layer>
  1539.         <id>129</id>
  1540.         <text>Category:</text>
  1541.     </content>
  1542.     <content>
  1543.         <layer>background</layer>
  1544.         <id>130</id>
  1545.         <text>Phone:</text>
  1546.     </content>
  1547.     <content>
  1548.         <layer>background</layer>
  1549.         <id>44</id>
  1550.         <text>Image Works Plus Shareware</text>
  1551.     </content>
  1552.     <content>
  1553.         <layer>background</layer>
  1554.         <id>103</id>
  1555.         <text>Image Works Plus Shareware</text>
  1556.     </content>
  1557.     <name>Records</name>
  1558.     <script>on openbackgroundif there is a menuItem "Sort Selected" of menu "Edit"then enable menuitem "Sort Selected" of menu "Edit"if there is a menuItem "Print Notes" of menu "File"then enable menuitem "Print Notes" of menu "File"set dontsearch of this bg to false-----------global mode -- which program is calling this bgif mode = "AddressBook"thenhide bg button "Gifts" -- not needed for A.B.set locktext of bg field "Gifts" to true -- allows for proper importingend ifif mode = "contribution"thenshow bg button "Gifts" -- needed for C.C.set locktext of bg field "Gifts" to false -- allows for proper exportingglobal UpdateAddress -- used by the "Adding Machine" people list on open bgput "True" into UpdateAddressput "True" into card field "UpdateAddress" of card "Contribution Title Screen"end if----------------global indexType -- what index is the defaultput bg field "indexType" into indexTypeset checkMark of menuItem "ALL RECORDS INDEX" of menu "Go" to FALSEset checkMark of menuItem "BUSINESS INDEX" of menu "Go" to FALSEset checkMark of menuItem "PEOPLE INDEX" of menu "Go" to FALSEset checkMark of menuItem "MAIL INDEX" of menu "Go" to FALSEset checkMark of menuItem IndexType of menu "Go" to trueaddcolor colorCard,stamp,1if there is a window "navigation"then set the hilitedbutton of window "navigation" to 5end openbackgroundon donavigationbeepend donavigationon closebackgroundglobal NewRecordif NewRecord = "True"then updateSortif there is a window notes then close window notesif there is a window gifts then close window giftsif there is a menuItem "Sort Selected" of menu "Edit"then disable menuitem "Sort Selected" of menu "Edit"if there is a menuItem "Print Notes" of menu "File"then disable menuitem "Print Notes" of menu "File"set dontsearch of this bg to truesend "checkIndex" to bg button "index"end closebackgroundon closecardif the short name of this card ‚↠bg field "name"then set the name of this card to bg field "name"-- UpdateWindowsFields Gifts -- I do not wan the user to be able to change the gifts manually.if there is a window "notes" then UpdateWindowsFields Notesend closecardon opencardplay slide2put the number of the first card of this bg -1 into StartNoput number of this card - startno && "/" && number of cards of this bg into bg field "‚Ä¢recordno"if there is a window "Gifts" then send updatethewindow to bg button "Gifts"if there is a window "notes" then UpdateWindows Notesif bg field "datecreated" is empty then send dateit to bg field "datecreated"end opencard------------------------------------------------------------------------on RemoveReturnsplay "knock3"set cursor to watchput target into OldTemprepeat with x = 1 to the number of characters in OldTempif char x of OldTemp <> return then put char x of OldTemp after tempend repeatput TEMP into targetend RemoveReturnson RemoveTabs FieldNoput the number of characters in bg field FieldNo into TotalCharput bg field FieldNo into OldTextrepeat with CharNo = 1 to TotalCharif char CharNo of OldText = tabthenput " " into char CharNo of OldTextend ifend repeatput oldText into bg field FieldNoend RemoveTabs------------------------------------------------------------------------Function ChooseBGField Dialogueset Cursor to watchget GetBG()return item 2 of singlePick (it,Dialogue)end ChooseBGFieldFunction GetBG -- use for importingrepeat with x = 1 to the number of bg fieldsif lockText of bg field x = "false"thenput short name of bg field x into TempHolderPut TempHolder & return after TheListend ifend repeatsort lines of TheListreturn TheListend GetBGFunction SinglePick TheList,Dialogueget XScrollBox(1,Dialogue,TheList)if it is "Help" thenanswer "You pushed the 'Help' button."else if it is empty thenanswer "You pushed the 'Cancel' button."elseput it into Theanswerreturn TheAnswerend ifend singlePickon multiplePickput "1,3,5" into initialget XScrollBoxM(initial,"Choose among these:",card field "scroller","Help")go this cardif it is "Help" thenanswer "You pushed the 'Help' button."else if it is empty thenanswer "You pushed the 'Cancel' button."elseput (the number of items in it div 2) into countif count is 1 then put "item" into itemWordelse put "items" into itemWordanswer "You chose" && count && itemWord & "."end ifend multiplePick----------- Dialing the phone ---------on dialNumber phoneNumber-- dial the phone with a specified number.put phoneNumber into phoneNumber2if phoneNumber is empty thenask "What phone number would you like dialed?"if the result is "Cancel" or it is empty then exit dialNumberput it into phoneNumberend ifput stripNonDials (phoneNumber) into PHoneNumberput "Ready to dial" && phoneNumber2 &"." & return &¬¨"Pick up your phone and then select one of the two methods of dialing."¬¨& return &"(With Audio you will need to hold phone up to mac speaker.)"¬¨into TEMPanswer TEMP with "Cancel" or "Audio" or "Modem"if it = "Audio" then dial phoneNumberelse if it = "Modem" then dial phoneNumber with modemend dialNumberfunction stripNonDials dialNumber-- ‚àÜ remove all "non phone" charactersrepeat with count = the length of dialNumber down to 1if char count of dialNumber is not in "0123456789,*#"then delete char count of dialNumberend repeatreturn dialNumberend stripNonDialson AddRecordask "Please enter the name for this new record" & return & "(Last,First):"repeatif it is empty then exit addRecordif char 1 of it = " " then delete char 1 of itelse exit repeatend repeatsend SwitchON to bg button "Sort"AddNewCard itend addRecordon AddNewCard Name-- put "Please wait... adding record:" && nameset cursor to watchlock screendomenu "new Card"-- send dateIt to bg field "datecreated"if name is not emptythenPut Name into bg field "name"send closeField to bg field "name"unlock screenselect text of bg field "Street"end if-- put empty-- hide messageend AddNewCardon idleglobal NewRecordif NewRecord = "True"thenglobal TickTime,StartTimeput the ticks - TickTime into TimeSpanput 1 into minuteDelay -- will be a bg field variableif TimeSpan < 75thenif the ticks - StartTime > MinuteDelay*60*60thenupdateSortput "False" into NewRecordend ifelseput the ticks into StartTimeend ifput the ticks into TickTime-- put (the ticks - StartTime) && MinuteDelay*60*60end ifend idleon updateSortplay "knock3"Picture "PleaseWait",resource,Dialogput "PLEASE WAIT... Sorting Records"global NewRecordlock screenclosecardset lockMessages to trueset lockRecent to trueset cursor to watchpush cardsort cards of this bg by bg field "name"pop cardunlock screenput "False" into NewRecordsend SwitchOff to bg button "Sort"opencardPUT EMPYHIDE MESSAGEif there is a window "PleaseWait" then close window "PleaseWait"set lockMessages to falseend UpdateSorton SortSelectedif there is not a window Notes then get selectionelse get selectedText of window Notesif it is empty then exit SortSelectedrepeat with x = 1 to the number of lines in itif line x of it is not a numberthensort lines of itif there is a window Notes then set the selectedText of window Notes to itelse  put it into selectionexit SortSelectedend ifend repeatsort it numericif there is a window Notes then set the selectedText of window Notes to itelse  put it into selectionend SortSelectedon PrintNoteslock screenif there is a window notes then UpdateWindowsFields Notesput bg field "name" & Return & return before bg Field Notesprint bg field "Notes"delete line 1 of bg field notesdelete line 1 of bg field notes-- unlock screenend PrintNotesOn PrintItif the OptionKey is downthen answer "Do you want to edit the reports?" with "cancel" or "just print" or "try"if it is try thendoMenu "Print Report..."exit PrintItelse if it is cancel then exit PrintItset cursor to watchclosecard -- housekeeping-- THIS WILL ALLOW THE USER TO CHOOSE ANY TEMPLATE AVAILABLE ----------------put ReportTemplates of this stack into TheListsort lines of TheListrepeat with num = the number of lines in TheList down to 1if line num of theList contains "‚Ä¢" then delete line Num of theListend repeatget XScrollBox(1,"Choose Report / Type Name or Select:",TheList)if it is empty then exit printitdelete item 1 of itput it into TheTemplate-- THIS ALLOWS THE USER TO CHOOSE WHO HE WANTS TO INCLUDE IN THE PRINT OUT ---put "All Records" & return into TheListput "Business Records" & return after TheListPut "Just This Record" & return after TheListPut "Marked to Mail" & return after TheListPut "People Records" & return after TheListget XScrollBox(1,"Which records do you want to include?",TheList)if it is empty then exit printitdelete item 1 of itput it into TheRecords-- THIS MARKS THE APPROPRIATE CARDS AND PRINTS THEM WITH THE TEMPLATE ----------doMenu "Page Setup..." -- this allows the user to switch to envelope etc...unmark all cardsif TheRecords = "All Records"then mark cards where bg field "name" is in bg field "All Records Index"if TheRecords = "Business Records"then mark cards where bg field "name" is in bg field "Business Index"if TheRecords = "Just This Record"then mark this cardif TheRecords = "Marked to Mail"then mark cards where bg field "name" is in bg field "Mail Index"if TheRecords = "People Records"then mark cards where bg field "name" is in bg field "People Index"if the number of marked cards = 0thenplay "knock3"Answer "There are no records that match your selection."elsepush cardlock screengo to card 1 of this bgopen report printing with template TheTemplateprint marked cardsclose printingpop cardend ifend PrintIton importItsend "ChooseFile" to bg button "File"end importIton exportItsend "exportrecords" to bg button "File"end exportIton CurIndexsend ShowIndex to bg button "Index"end CurIndexon Index xglobal IndexTypeset checkMark of menuItem IndexType of menu "Go" to falseput x into IndexTypeput indexType into bg field "IndexType"set checkMark of menuItem IndexType of menu "Go" to truesend ShowIndex to bg button "Index"end Indexon DeletePagesend Mouseup to bg button "delete"end DeletePagefunction checkCommas TheTExtget itemDelimiterput it into ResetDelimiterset itemDelimiter to ","if the number of items in TheTExt > 2then --------------- remove the superfluous commasput 0 into TheCountrepeat with z = 1 to the number of characters in TheTextif char z of TheText = ","thenadd 1 to TheCountif TheCount > 1 then put " " into Char z of TheTextend ifend repeatelseput 0 into TheCountrepeat with z = 1 to the number of characters in TheTextif char z of TheText = ","thenadd 1 to TheCountif TheCount > number of items in TheTExt -1 then put " " into Char z of TheTextend ifend repeatend ifrepeatput offset("  ",TheText) into BlankSpaceif blankspace > 0 then delete char blankspace of theTextelse exit repeatend repeatif char 1 of item 2 of TheText = " " then delete char 1 of item 2 of thetextset itemDelimiter to ResetDelimiterreturn TheTextend checkCommason helpglobal modeif mode = "contribution"thenlock screengo stack "help" in a new windowset cursor to watchgo card "Address Book"elseoopsend ifend help</script>
  1559. </background>
  1560.